Skip to content

Instantly share code, notes, and snippets.

@ujihisa
Forked from cho45/Rakefile
Created July 11, 2009 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ujihisa/145097 to your computer and use it in GitHub Desktop.
Save ujihisa/145097 to your computer and use it in GitHub Desktop.
require "rubygems"
require "rake"
require "pathname"
require "rexml/document"
manifest = REXML::Document.new(File.read("AndroidManifest.xml"))
PACKAGE = manifest.elements["/manifest/@package"].value
NAME = manifest.elements["/manifest/application/activity/@android:name"].value
task :default => :run
task :run do
sh "ant", "debug"
sh "adb", "install", "-r", Pathname.glob("bin/*.apk")[0]
sh "adb", "shell", "am start -a android.intent.action.MAIN -n #{PACKAGE}/#{NAME}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment