fix(android-build): run gradle from android project root

This commit is contained in:
Dark_Avery 2026-03-30 16:34:18 +03:00
parent 76b375bd03
commit 7c8bc17db6
1 changed files with 5 additions and 1 deletions

View File

@ -41,6 +41,7 @@ GRADLE_BIN="gradle"
if [[ -x "$ROOT_DIR/gradlew" ]]; then
GRADLE_BIN="$ROOT_DIR/gradlew"
fi
GRADLE_RUN_DIR="$ROOT_DIR"
ATTEMPTS="${ATTEMPTS:-5}"
SLEEP_SECONDS="${SLEEP_SECONDS:-15}"
@ -171,7 +172,10 @@ prepare_wsl_build_dir
for attempt in $(seq 1 "$ATTEMPTS"); do
echo "==> Android build attempt $attempt/$ATTEMPTS ($TASK)"
if "$GRADLE_BIN" --no-daemon --console=plain "$TASK"; then
if (
cd "$GRADLE_RUN_DIR"
"$GRADLE_BIN" --no-daemon --console=plain "$TASK"
); then
exit 0
fi