From 2f2eecd8e6a1bfd956308043be6b2c2b221f5228 Mon Sep 17 00:00:00 2001 From: Fred Medlin Date: Thu, 12 Apr 2012 19:33:38 -0400 Subject: [PATCH 1/4] Update obsolete gems --- Rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 7e0d1dd..043e595 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,9 @@ require 'rake/clean' require 'rubygems' -require 'rake/gempackagetask' -require 'rake/rdoctask' +require 'rubygems/package_task' +require 'rdoc/task' -Rake::RDocTask.new do |rd| +RDoc::Task.new do |rd| rd.main = "README.rdoc" rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*") rd.title = 'Your application title' @@ -11,7 +11,7 @@ end spec = eval(File.read('mirahndroid.gemspec')) -Rake::GemPackageTask.new(spec) do |pkg| +Gem::PackageTask.new(spec) do |pkg| end require 'rake/testtask' From 597c6ea937a2fe1ad8b68ccd486b97de36bcda4e Mon Sep 17 00:00:00 2001 From: Fred Medlin Date: Fri, 13 Apr 2012 00:05:06 -0400 Subject: [PATCH 2/4] Utilize the new Android project build tools --- assets/build.xml.patch | 3 +-- assets/custom_rules.xml | 11 +++++++++++ bin/mirahndroid | 6 ++---- mirahndroid.gemspec | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 assets/custom_rules.xml diff --git a/assets/build.xml.patch b/assets/build.xml.patch index 199b86c..8e268c1 100644 --- a/assets/build.xml.patch +++ b/assets/build.xml.patch @@ -1,6 +1,5 @@ 66a67,76 -> description="Compiles project's .mirah files into .class files"> +> > > > diff --git a/assets/custom_rules.xml b/assets/custom_rules.xml new file mode 100644 index 0000000..afd9aea --- /dev/null +++ b/assets/custom_rules.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/bin/mirahndroid b/bin/mirahndroid index e8d9603..d13b1c0 100755 --- a/bin/mirahndroid +++ b/bin/mirahndroid @@ -56,7 +56,8 @@ command :create do |c| end.join ' ' `android create project #{params}` - `patch #{File.join(path, 'build.xml')} #{File.join(file_root, "assets/build.xml.patch")}` + #`patch #{File.join(path, 'build.xml')} #{File.join(file_root, "assets/build.xml.patch")}` + FileUtils.cp File.join(file_root, 'assets/custom_rules.xml'), File.join(path, 'custom_rules.xml') FileUtils.rm File.join(java_file_dir, activity + '.java') mirah = ERB.new(File.read(File.join(file_root, 'assets/starter_activity.mirah.erb'))).result binding @@ -64,9 +65,6 @@ command :create do |c| f << mirah end - File.open File.join(path, 'default.properties'), 'a' do |f| - f << "target-version=#{target}\n" - end puts "Project generated! Edit your starter activity at #{File.expand_path File.join(java_file_dir, activity + '.mirah')}" end end diff --git a/mirahndroid.gemspec b/mirahndroid.gemspec index e5237b5..c756863 100644 --- a/mirahndroid.gemspec +++ b/mirahndroid.gemspec @@ -2,7 +2,7 @@ require 'rake' spec = Gem::Specification.new do |s| s.name = 'mirahndroid' - s.version = '0.0.01' + s.version = '0.0.02' s.author = 'Daniel Jackoway' s.email = 'mirahndroid@danieljackoway.com' s.homepage = 'http://github.com/jackowayed/mirahndroid' From 03cbed85667664eb74755e5edcefe44e029a3ae9 Mon Sep 17 00:00:00 2001 From: Fred Medlin Date: Fri, 13 Apr 2012 00:07:03 -0400 Subject: [PATCH 3/4] Ignore pkg output --- .gitignore | 1 + assets/build.xml.patch | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 assets/build.xml.patch diff --git a/.gitignore b/.gitignore index c111b33..34b1125 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.gem +pkg/* \ No newline at end of file diff --git a/assets/build.xml.patch b/assets/build.xml.patch deleted file mode 100644 index 8e268c1..0000000 --- a/assets/build.xml.patch +++ /dev/null @@ -1,10 +0,0 @@ -66a67,76 -> -> -> -> -> -> -> -> -> From 72d31a38c163fa13b71fabe1317c4cd994db39b4 Mon Sep 17 00:00:00 2001 From: Fred Medlin Date: Fri, 13 Apr 2012 00:19:38 -0400 Subject: [PATCH 4/4] Refer to the shortened install target --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20d205b..669ff2a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Create an app using `mirahndroid create` (use `mirahndroid help create` to see t You can compile your app by running `ant debug` in the root of your app. -Install it by running `adb install -r bin/YourAppName-debug.apk` +Install it by running `adb installd` ## License