BobStore/F-Droid/ant-prepare.sh
Peter Serwylo aa38418c91 Bump support libraries to v20. Gradle doesn't build them by source for now.
The support libraries expect to be using the gradle plugin version 0.10.0.
We are currently on version 1.0.0. They use APIs in their build script which
have moved or been removed, and so the build just breaks when we run it with
the 1.0.0 plugin. I tried some magic to make it work in various ways, but
kept failing. As such, I've reverted the `gradle -PsourceDeps` build to not
build the support libraries from source. In the future, we should be able to
change this if they change the plugin version to a more recent one.

Note that the ant build script still hasn't been modified, and so will be
using the binary support-v4 library, but should build appcompat-v7 from source.

Was going to bump to Support v21, however there is some behaviour change which
causes a crash. They have removed the progress view from the toolbar/actionbar.
This breaks the AppDetails activity. As such, I'll leave that for the future.

For now, there will be a slight difference between building with
ant (which uses support v-almost-21) and gradle (which uses v20).
This will stay the case until we get around to completely porting
the app to v21, and fixing any bugs or UI sadness that arises.
2015-03-03 00:46:43 +11:00

56 lines
1.5 KiB
Bash
Executable File

#!/bin/bash -ex
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
# set up test signing keys for any `ant release` runs
if [ -e ~/.android/ant.properties ]; then
cp ~/.android/ant.properties ./
else
echo "skipping release ant.properties"
fi
EXTERN=../extern
place_support_v4() {
mkdir -p $1/libs
cp libs/android-support-v4.jar $1/libs/
}
android update lib-project --path $EXTERN/UniversalImageLoader/library
android update lib-project --path $EXTERN/AndroidPinning
android update lib-project --path $EXTERN/MemorizingTrustManager
android update lib-project --path $EXTERN/libsuperuser/libsuperuser
android update lib-project --path $EXTERN/zxing-core
android update lib-project --path $EXTERN/android-support-v4-preferencefragment
place_support_v4 $EXTERN/android-support-v4-preferencefragment
android update lib-project --path $EXTERN/Support/v7/appcompat --target android-21
place_support_v4 $EXTERN/Support/v7/appcompat
android update project --path . --name F-Droid
{ echo -e "\nSuccessfully updated the main project.\n"; } 2>/dev/null
# technically optional, needed for the tests
cd test
android update test-project --path . --main ..
{ echo -e "\nSuccessfully updated the test project.\n"; } 2>/dev/null