diff --git a/MOBILE/template.pom b/MOBILE/template.pom index 086196b..cc116f4 100644 --- a/MOBILE/template.pom +++ b/MOBILE/template.pom @@ -2,13 +2,16 @@ 4.0.0 + org.ooni oonimkall @VERSION@ aar + oonimkall - OONI Probe Engine for Android - https://github.com/ooni/probe-engine + OONI Probe for Android + https://github.com/ooni/probe-cli + The 3-Clause BSD License @@ -16,18 +19,21 @@ repo + https://github.com/ooni/probe-engine https://github.com/ooni/probe-engine.git + Simone Basso simone@openobservatory.org - developer + Core developer Europe/Rome + diff --git a/build-android.bash b/build-android.bash index 161edb7..afef66f 100755 --- a/build-android.bash +++ b/build-android.bash @@ -2,7 +2,7 @@ set -e if [ -z "$ANDROID_HOME" -o "$1" = "--help" ]; then echo "" - echo "usage: $0" + echo "usage: $0 [--sign]" echo "" echo "Please set ANDROID_HOME. We assume you have installed" echo "the Android SDK. You can do that on macOS using:" @@ -27,5 +27,16 @@ set -x export PATH=$(go env GOPATH)/bin:$PATH go get -u golang.org/x/mobile/cmd/gomobile gomobile init -output=MOBILE/android/oonimkall.aar -gomobile bind -target=android -o $output -ldflags="-s -w" ./pkg/oonimkall +version=$(date -u +%Y.%m.%d-%H%M%S) +aarfile=MOBILE/android/oonimkall-$version.aar +gomobile bind -target=android -o $aarfile -ldflags="-s -w" ./pkg/oonimkall +pomfile=./MOBILE/android/oonimkall-$version.pom +pomtemplate=./MOBILE/template.pom +cat $pomtemplate|sed "s/@VERSION@/$version/g" > $pomfile +if [ "$1" == "--sign" ]; then + cd ./MOBILE/android + for file in `ls *`; do + gpg -ab -u simone@openobservatory.org $file + done + jar -cvf bundle.jar oonimkall-$version* +fi