Skip to content

epic: Minify release builds #1182

Description

@ovitrif

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions