update ant setup script to get all settings from their original sources

* target comes from project.properties

*
This commit is contained in:
Hans-Christoph Steiner 2015-06-03 16:00:09 -04:00
parent 77d1b82411
commit 3c26f67392
4 changed files with 33 additions and 8 deletions

4
.gitignore vendored
View File

@ -14,3 +14,7 @@ builds
/patches/*
obj
releases
# ant build products
build.xml
proguard-project.txt

2
BUILD
View File

@ -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!

28
setup-ant Executable file
View File

@ -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

View File

@ -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