mirror of
https://github.com/Heretek-AI/hermes-mobile.git
synced 2026-07-01 16:12:43 -04:00
fix(fdroid): gradle clean before assembleRelease for the F-Droid build
The previous F-Droid build run produced a 'BUILD SUCCESSFUL' but the universal APK was missing from apps/mobile/android/app/build/outputs/apk/release/. The cause: the first gradle assembleRelease (for the GitHub Release) had already produced per-ABI + universal APKs. The F-Droid build's gradle re-evaluated the signing config (now null because -Phermes.fdroid=true leaves it unset), and the resulting packageRelease task overwrote the per-ABI APKs but skipped the universal APK packaging task (UP-TO-DATE). `gradle clean assembleRelease` forces a from-scratch build that produces all 4 APKs (per-ABI + universal). The clean takes ~10s; the from-scratch release build is ~3min on CI. F-Droid's own rebuild will be similarly slow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+12
-2
@@ -64,9 +64,19 @@ cp android-runner/app/build.gradle.template apps/mobile/android/app/build.gradle
|
||||
# that F-Droid packages. `-Phermes.fdroid=true` bypasses
|
||||
# the v0.1.0 release-pipeline signing fail-fast (which
|
||||
# would otherwise reject the empty keystore.properties).
|
||||
echo "→ gradle assembleRelease"
|
||||
#
|
||||
# v0.1.0: pass `clean assembleRelease` so a fresh build
|
||||
# runs. The previous `assembleRelease` (for the GitHub
|
||||
# Release) leaves signed APKs in build/outputs/apk/release/.
|
||||
# The F-Droid build re-evaluates the signing config (which
|
||||
# is null for F-Droid) and the resulting packageRelease
|
||||
# task overwrites the per-ABI APKs but the universal APK
|
||||
# packaging task is UP-TO-DATE-skipped, so the universal
|
||||
# APK file disappears. A `clean` forces a from-scratch
|
||||
# build that produces all 4 APKs (per-ABI + universal).
|
||||
echo "→ gradle clean assembleRelease"
|
||||
cd apps/mobile/android
|
||||
./gradlew assembleRelease --no-daemon \
|
||||
./gradlew clean assembleRelease --no-daemon \
|
||||
--no-build-cache \
|
||||
--scan \
|
||||
-Pandroid.injected.testOnly=false \
|
||||
|
||||
Reference in New Issue
Block a user