diff --git a/.gitignore b/.gitignore index 64134ea8..028e6d10 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ builds /patches/* obj releases + +# ant build products +build.xml +proguard-project.txt diff --git a/BUILD b/BUILD index bd535871..625252e0 100644 --- a/BUILD +++ b/BUILD @@ -54,7 +54,7 @@ into < 1M chunks because some Android devices don't like resources larger than Now build the Android app - ./update-ant-build + ./setup-ant ant release This will produce an unsigned Tor package in ./bin/Orbot-unsigned.apk! diff --git a/setup-ant b/setup-ant new file mode 100755 index 00000000..fab844e1 --- /dev/null +++ b/setup-ant @@ -0,0 +1,28 @@ +#!/bin/sh + +set -e +set -x + +if ! which android > /dev/null; then + if [ -z $ANDROID_HOME ]; then + if [ -e ~/.android/bashrc ]; then + . ~/.android/bashrc + else + echo "'android' not found, ANDROID_HOME must be set!" + exit + fi + else + export PATH="${ANDROID_HOME}/tools:$PATH" + fi +fi + +# fetch target from project.properties +eval `grep '^target=' project.properties` + +projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' res/values/strings.xml` + +android update project --path . --name $projectname --target $target --subprojects + +for lib in `sed -n 's,^android\.library\.reference\.[0-9][0-9]*=\(.*\),\1,p' project.properties`; do + android update lib-project --path $lib --target $target +done diff --git a/update-ant-build.sh b/update-ant-build.sh deleted file mode 100755 index 2fa1bca7..00000000 --- a/update-ant-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# make sure your Android SDK tools path is set in SDK_BASE -android update project -t android-21 --path . --name Orbot --subprojects -android update lib-project -t android-21 --path external/appcompat -android update lib-project -t android-21 --path external/superuser-commands/RootCommands-Library/ -android update lib-project -t android-21 --path external/jsocks/jsockslib