Refactor android-builder into command scripts
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
set -e
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
source "$ROOT_DIR/lib/common.sh"
|
||||
|
||||
test -f local.properties || echo "sdk.dir=$SDK" > local.properties
|
||||
|
||||
BUILD_TYPE="$(get_build_type)"
|
||||
case "$BUILD_TYPE" in
|
||||
debug) TASK="assembleDebug" ;;
|
||||
release) TASK="assembleRelease" ;;
|
||||
*)
|
||||
echo "Unknown build type: $BUILD_TYPE"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f ./gradlew ]; then
|
||||
chmod +x ./gradlew
|
||||
./gradlew "$TASK"
|
||||
else
|
||||
gradle "$TASK"
|
||||
fi
|
||||
Reference in New Issue
Block a user