fix(android): keep callbacks on non-public base classes from R8

Merged
IT
1mo ago
+6-0

Description

Adds a keep rule to core's proguard-rules.pro for @ActivityCallback and @PermissionCallback methods on any Plugin subclass. #8646 keeps the annotation types, but R8 still drops these callbacks when they're declared on a non-public base class.

Tested on 8.5.3 with R8 on and proguard-android-optimize.txt. With #8646 alone, an @ActivityCallback on a package-private base class fails with "There is no ActivityCallback method registered". With this rule it resolves as with R8 off.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation
  • Other (CI, chores, etc.)

Rationale / Problems Fixed

https://outsystemsrd.atlassian.net/browse/RMET-5521

Platforms Affected

  • Android
  • iOS
  • Web

Notes

The Room and Firebase rules from the first version now ship in the plugins that need them, per review. Capacitor 9 gets the same rule in #8658.