Goal: release builds shrink code and resources with R8.
Context
Google Play console shows a warning because the release build is not minified. This changed on August 26: it is becoming a requirement, not merely a recommendation.
Reasons
- Google Play compliance: From February 2027, apps with over 10 MB of DEX need at least 25% optimization, shrinking, and obfuscation. Non-compliance can affect visibility and publishing, see: Official policy.
- Smaller downloads and installs: Bitkit 2.4.0’s arm64 APK is 162.9 MB, including 89.7 MB of DEX that R8 can optimize. Actual savings still need measurement.
- Potential runtime improvements: Google cites faster startup, lower memory use, better rendering, and fewer ANRs. These are expected benefits, not Bitkit results yet, see: R8 guidance.
- Better library ownership: android libs should ship UniFFI/JNA keep rules in their AARs rather than leaving patch work requirements to consumers apps, a concern even more relevant for
paykit-rs which is targeting a larger audience, not only the Bitkit app.
Scope
App
- Enable R8 optimization on the build variant:
release.
Libraries
Each consumed UniFFI Android AAR ships targeted R8 consumer keep rules.
Acceptance
- A minified release build installs and runs code from the rust libs without runtime crashes.
- Each consumed UniFFI AAR contributes a non-empty
proguard.txt to that build.
Goal: release builds shrink code and resources with R8.
Context
Google Play console shows a warning because the release build is not minified. This changed on August 26: it is becoming a requirement, not merely a recommendation.
Reasons
paykit-rswhich is targeting a larger audience, not only the Bitkit app.Scope
App
release.Libraries
Each consumed UniFFI Android AAR ships targeted R8 consumer keep rules.
Acceptance
proguard.txtto that build.