Skip to content

Instantly share code, notes, and snippets.

@ajayk
Created September 10, 2011 18:33
Show Gist options
  • Save ajayk/1208621 to your computer and use it in GitHub Desktop.
Save ajayk/1208621 to your computer and use it in GitHub Desktop.
Index: android.rb
===================================================================
--- android.rb (revision 13816)
+++ android.rb (working copy)
@@ -77,11 +77,11 @@
$properties = $sys_properties.read_properties()
$sdk_path = $properties["androidsdkpath"]
$platform = $properties["androidplatform"]
- $adb = Platform.path_for(File.join($sdk_path, "platform-tools", "adb"))
+ $adb = Platform.path_for(File.join($sdk_path, "platform-tools", "adb.exe"))
$aapt = get_binary("aapt")
- $builder = Platform.path_for(File.join($sdk_path, "tools", "apkbuilder"))
- $android = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "android")))
- $emulator = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "emulator")))
+ $builder = Platform.path_for(File.join($sdk_path, "tools", "apkbuilder.bat"))
+ $android = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "android.bat")))
+ $emulator = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "emulator.exe")))
class CheckPreconditions
def handle(fun, dir, args)
@@ -180,7 +180,9 @@
if (android_installed?)
android_target = $properties["androidtarget"].to_s
sh "#{$android} update project -p android/app/ --target #{android_target}"
- sh "cd android/app; ant debug; cd ../../;"
+ temp = "android"
+ cmd = "cd #{temp} && cd app && ant debug "
+ sh cmd
apk = File.join('build', 'android', 'app', 'android-server.apk')
sh "cp android/app/bin/MainActivity-debug.apk #{apk}"
copy_to_prebuilt(apk, fun)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment