fix: use Gradle binary directly, bypass gradlew (act_runner strips args)
Some checks failed
Build & Deploy APK / build (push) Failing after 36s
Some checks failed
Build & Deploy APK / build (push) Failing after 36s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,13 +21,23 @@ jobs:
|
|||||||
ls "$ANDROID_HOME/platforms" > /dev/null 2>&1 || echo "WARNING: Cannot list ANDROID_HOME (permissions?), build may still work via gradle"
|
ls "$ANDROID_HOME/platforms" > /dev/null 2>&1 || echo "WARNING: Cannot list ANDROID_HOME (permissions?), build may still work via gradle"
|
||||||
|
|
||||||
- name: Build Release APK
|
- name: Build Release APK
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./gradlew
|
GRADLE_PROPS="gradle/wrapper/gradle-wrapper.properties"
|
||||||
sed -i 's/\r$//' ./gradlew
|
DIST_URL=$(grep distributionUrl "$GRADLE_PROPS" | cut -d'=' -f2 | sed 's/\\//g')
|
||||||
echo "=== Testing gradle ==="
|
GRADLE_DIR="$HOME/.gradle/wrapper/dists/gradle-8.11.1-bin"
|
||||||
./gradlew tasks --no-daemon 2>&1 | head -20
|
|
||||||
echo "=== Building APK ==="
|
if [ ! -d "$GRADLE_DIR" ]; then
|
||||||
./gradlew assembleRelease --no-daemon
|
mkdir -p /tmp/gradle-download
|
||||||
|
wget -q "$DIST_URL" -O /tmp/gradle-download/gradle.zip
|
||||||
|
mkdir -p "$GRADLE_DIR"
|
||||||
|
unzip -qo /tmp/gradle-download/gradle.zip -d "$GRADLE_DIR"
|
||||||
|
rm /tmp/gradle-download/gradle.zip
|
||||||
|
fi
|
||||||
|
|
||||||
|
GRADLE_BIN=$(find "$GRADLE_DIR" -name "gradle" -path "*/bin/gradle" | head -1)
|
||||||
|
echo "Using Gradle: $GRADLE_BIN"
|
||||||
|
"$GRADLE_BIN" assembleRelease --no-daemon
|
||||||
|
|
||||||
- name: Deploy APK & update version
|
- name: Deploy APK & update version
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user