chore(android): enable R8 minification + resource shrinking for releases #1527

Merged
chris merged 1 commit from chore/android-r8-minify into main 2026-11-15 19:21:58 +01:00
Owner

Summary

Play Console flagged the Play DEX obfuscation metric at 0% for 0.10.20 (deadline Feb 2027).

  • Release builds now run R8 (isMinifyEnabled = true) + resource shrinking (isShrinkResources = true); version bump to 0.10.22
  • proguard-rules.pro stays rule-free by design: all dependencies ship consumer rules (Retrofit 3, OkHttp 5, kotlinx-serialization 1.11, Coil 3.6, media3 1.11, Room 2.8, WorkManager 2.12, GMS Cast 22.3), app code has zero reflective/dynamic-resource surfaces (artifact-verified against the exact pinned versions); osmdroid 6.1.20 ships no rules but needs none for our usage
  • android-release.yml attaches mapping.txt as memories-android-<v>-mapping.txt (hard-fail when missing) — Play gets the mapping embedded in the AAB; the Forgejo asset covers sideload-APK retrace
  • Play publishing runbook updated

Verification

  • :app:bundleRelease :app:assembleRelease green incl. minifyReleaseWithR8, optimizeReleaseResources, lintVitalRelease; R8 emitted zero missing-class warnings
  • mapping.txt: 8,465 class mappings, app classes obfuscated (e.g. AppContainer -> hq)
  • Signed with the release keystore, SHA-256 53e9…ec13 verified via apksigner
  • AAB 21.1 MB → 11.1 MB (−47%), APK 22.3 MB → 5.5 MB (−75%)
  • :core:test :app:testDebugUnitTest green
## Summary Play Console flagged the Play DEX obfuscation metric at 0% for 0.10.20 (deadline Feb 2027). - Release builds now run R8 (`isMinifyEnabled = true`) + resource shrinking (`isShrinkResources = true`); version bump to 0.10.22 - `proguard-rules.pro` stays rule-free by design: all dependencies ship consumer rules (Retrofit 3, OkHttp 5, kotlinx-serialization 1.11, Coil 3.6, media3 1.11, Room 2.8, WorkManager 2.12, GMS Cast 22.3), app code has zero reflective/dynamic-resource surfaces (artifact-verified against the exact pinned versions); osmdroid 6.1.20 ships no rules but needs none for our usage - `android-release.yml` attaches `mapping.txt` as `memories-android-<v>-mapping.txt` (hard-fail when missing) — Play gets the mapping embedded in the AAB; the Forgejo asset covers sideload-APK retrace - Play publishing runbook updated ## Verification - `:app:bundleRelease :app:assembleRelease` green incl. `minifyReleaseWithR8`, `optimizeReleaseResources`, `lintVitalRelease`; R8 emitted zero missing-class warnings - mapping.txt: 8,465 class mappings, app classes obfuscated (e.g. `AppContainer -> hq`) - Signed with the release keystore, SHA-256 53e9…ec13 verified via apksigner - AAB 21.1 MB → 11.1 MB (−47%), APK 22.3 MB → 5.5 MB (−75%) - `:core:test :app:testDebugUnitTest` green
chore(android): enable R8 minification + resource shrinking for releases
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m29s
Build and Deploy / Android unit tests and debug APK (push) Successful in 6m28s
3014dfb46a
Play Console flagged 0% DEX obfuscation on 0.10.20. Release builds now run
R8 (isMinifyEnabled) and shrink unused resources (isShrinkResources);
proguard-rules.pro stays rule-free — every dependency ships consumer rules
(Retrofit 3, OkHttp 5, kotlinx-serialization 1.11, Coil 3, media3, Room,
WorkManager, GMS Cast) and the app has no reflective or dynamic-resource
surfaces (artifact-verified). Version bump to 0.10.22.

android-release.yml now attaches mapping.txt as memories-android-<v>-mapping.txt
(hard-fail when missing): Play gets the mapping embedded in the AAB, the
Forgejo asset covers sideload-APK retrace. Runbook updated.
chris force-pushed chore/android-r8-minify from 3014dfb46a
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m29s
Build and Deploy / Android unit tests and debug APK (push) Successful in 6m28s
to 5a8d3572ef
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 2m8s
Build and Deploy / Android unit tests and debug APK (push) Successful in 4m7s
2026-11-15 19:11:12 +01:00
Compare
chris merged commit 00f4e2a53f into main 2026-11-15 19:21:58 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1527
No description provided.