Skip to content

build(android): enable R8/proguard minification for release AAB #115

Description

@connortechnology

Google Play Console warns: "There is no deobfuscation file associated with this App Bundle. If you use obfuscated code (R8/proguard), uploading a deobfuscation file will make crashes and ANRs easier to analyze and debug. Using R8/proguard can help reduce app size."

Currently `app/android/app/build.gradle` sets `minifyEnabled false` in the release buildType, so R8 never runs and no `mapping.txt` is produced.

Scope

  • Set `minifyEnabled true` (and `shrinkResources true`) on the `release` buildType
  • Add keep rules in `proguard-rules.pro` for:
    • Capacitor core + plugins (reflection-based bridge)
    • Media3 / ExoPlayer
    • Any other reflective libraries in use
  • Upload generated `mapping.txt` as a build artifact and attach it on Play Console releases (workflow update in `.github/workflows/build-android.yml`)
  • Test on a physical Android device: playback, notifications, plugins, deep links, downloads

Not blocking current promotion — the warning is informational. Targeting a future release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions