-
-
Save jayridge/e318b9e0b3935626ee9e to your computer and use it in GitHub Desktop.
xcode ant wrapper
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/bash | |
ANT=/usr/local/bin/ant | |
ACTION=${ACTION:-build} | |
CONFIGURATION=${CONFIGURATION:-Debug} | |
PATTERN='s/^.*\[javac\] //' | |
if [ "$#" -gt 0 ];then | |
ACTION=$1 | |
fi | |
if [ "$#" -gt 1 ];then | |
CONFIGURATION=$2 | |
fi | |
>&2 echo "xant $ACTION $CONFIGURATION" | |
case $ACTION in | |
build*) | |
if [ $CONFIGURATION == "Release" ]; then | |
$ANT release | sed -e "$PATTERN" | |
else | |
$ANT debug | sed -e "$PATTERN" | |
fi | |
;; | |
install*) | |
if [ $CONFIGURATION == "Release" ]; then | |
$ANT installr | sed -e "$PATTERN" | |
else | |
$ANT installd | sed -e "$PATTERN" | |
fi | |
;; | |
clean*) | |
$ANT clean | |
;; | |
*) | |
echo "usage: `basename $0` [ build | install | clean ] [ Debug | Release ]" | |
exit 1 | |
;; | |
esac | |
exit ${PIPESTATUS[0]} || 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wraps ant for build and install of android projects under XCode 6.
./xant
as build tool./xant
, arguments$(ACTION)
, directory is set and pass build settings is selectedinstall $(CONFIGURATION)
toArguments Passed On Launch
, repeat with Testseed http://code.davidjanes.com/blog/2009/11/20/how-to-use-xcode-for-android-projects/