Repository navigation
Conversation
There was a problem hiding this comment.
Because some of this conflicts with PRs #8657 #8646, I'm wondering if it's worth instead after merging 8657 merge main to next, and then in this PR we remove the NativePlugin line because that's removed in Cap 9?
Because as of right now the only difference between this PR and the other ones is no NativePlugin right?
There was a problem hiding this comment.
Yep, the only difference is the NativePlugin line. Once #8657 is in and main is merged into next, I’ll drop that line here or close this PR if it’s already gone.
jcesarmobile
left a comment
There was a problem hiding this comment.
this rules are for Capacitor itself, Capacitor doesn't use firebase, so I don't think we should add rules for things we don't use in Capacitor
For apps it can be added in the template file
https://github.com/ionic-team/capacitor/blob/main/android-template/app/proguard-rules.pro
but also, I don't think it's something we should add for all users if not all of them are using that. And also, if we add rules in the template, OS uses their own templates, so would have no effect on OS apps.
plugins also have a proguard-rules.pro file, I think that's where this should go, even if it means that several plugins add the same rules, but it's the plugins that really need it
Yeah that's probably better. I’ll drop the Room and Firebase lines here and from #8657, and leave the template alone. The plugins that bring the old versions (Health & Fitness, Barcode Scanner, and the OS Firebase plugins) will ship the rules themselves. I'll also add a note in the Cap 9 docs which rules apps need if their own dependencies bring them. |
Dropped the Room and Firebase lines. Health & Fitness, Barcode Scanner and the OS Firebase plugins ship them now, and the docs list them for apps (ionic-team/capacitor-docs#622). |
Description
Adds keep rules to core's
proguard-rules.pro, which reaches every app throughconsumerProguardFiles:NativePluginline@ActivityCallbackand@PermissionCallbackmethods on anyPluginsubclass, including non-public base classesTested on 9.0.0-alpha.8 with R8 on. With the current rules, an
@ActivityCallbackon a package-private base class is lost. With these rules it matches R8 off.Change Type
Rationale / Problems Fixed
https://outsystemsrd.atlassian.net/browse/RMET-5521
Platforms Affected
Notes
The Room and Firebase rules from the first version now ship in the plugins that need them, per review. Capacitor 8 gets the callback rule in #8657.