Skip to content

Instantly share code, notes, and snippets.

@abeluck
Last active December 16, 2015 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abeluck/5374457 to your computer and use it in GitHub Desktop.
Save abeluck/5374457 to your computer and use it in GitHub Desktop.
ant setup script for automated android project builds
#!/bin/sh
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' app/res/values/strings.xml`
echo "Setting up build for $projectname"
echo ""
for f in `find external/ -name project.properties`; do
projectdir=`dirname $f`
echo "Updating ant setup in $projectdir:"
android update lib-project -p $projectdir
done
if [ -f app/libs/android-support-v4.jar ]; then
for f in `find external/ -name android-support-v4.jar`; do
libsdir=`dirname $f`
echo "Updating support library in $libsdir:"
cp -f app/libs/android-support-v4.jar $libsdir
done
fi
android update project -p app/ --subprojects --name "$projectname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment