Add android-builder wrapper command

This commit is contained in:
Dark98
2026-07-02 05:47:39 +01:00
parent 6df469c073
commit 315e693b1b
7 changed files with 53 additions and 15 deletions
+3
View File
@@ -22,5 +22,8 @@ if [ -f ./gradlew ]; then
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
+3
View File
@@ -12,6 +12,9 @@ if [ ! -f "$APK" ]; then
echo
echo "Run:"
echo " android-builder build"
echo
echo "If build fails because ./gradlew is missing, regenerate the project with:"
echo " android-builder new <ProjectName>"
exit 1
fi
+1
View File
@@ -7,6 +7,7 @@ echo "Usage:"
echo " android-builder setup"
echo " android-builder doctor"
echo " android-builder new MyApp"
echo " android-builder wrapper"
echo " android-builder new MyApp --template empty"
echo " android-builder build"
echo " android-builder export"
+17
View File
@@ -0,0 +1,17 @@
#!/data/data/com.termux/files/usr/bin/bash
set -e
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
source "$ROOT_DIR/lib/common.sh"
if [ -f settings.gradle ] || [ -f build.gradle ] || [ -f app/build.gradle ]; then
install_gradle_wrapper_assets "."
echo "Gradle wrapper installed."
echo
echo "Next:"
echo " ./gradlew assembleDebug"
else
echo "Error: run this command from the root of an Android project."
echo "Expected files like settings.gradle, build.gradle, or app/build.gradle."
exit 1
fi