Last active
December 16, 2015 04:08
-
-
Save abeluck/5374457 to your computer and use it in GitHub Desktop.
ant setup script for automated android project builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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