30 lines
736 B
Bash
Executable File
30 lines
736 B
Bash
Executable File
#!/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
|
|
echo "Error: ./gradlew is missing."
|
|
echo "This project needs the vendored Gradle wrapper generated by android-builder new."
|
|
echo
|
|
echo "If this is an existing project, regenerate it with:"
|
|
echo " android-builder new <ProjectName>"
|
|
exit 1
|
|
fi
|