Closed lemnik closed 4 months ago
Format | Size impact of Bugsnag (kB) | Size impact of Bugsnag when Minified (kB) |
---|---|---|
APK | 1852.6 | 1674.82 |
arm64_v8a | 631.04 | 450.82 |
armeabi_v7a | 565.51 | 385.29 |
x86 | 704.75 | 528.62 |
x86_64 | 676.09 | 495.86 |
Generated by :no_entry_sign: Danger
@lemnik this PR mentions "Proguard consumer rules" but the rules modified in this PR are not consumer rules AFAICT. Consumer rules were disabled in https://github.com/bugsnag/bugsnag-android/issues/107
I also was unable to find any documentation that says the referenced rules should be copy pasted manually and kept up-to-date with the various artifacts.
Do you have a reference to how these rules (and those of the other sub-projects) are supposed to be included in apps?
Hi @AlexanderGH
The file might not be named as "consumer" but these are our configured consumer Proguard rules, as set here: https://github.com/bugsnag/bugsnag-android/blob/next/buildSrc/src/main/kotlin/com/bugsnag/android/BugsnagBuildPlugin.kt#L206
The consumer proguard rules were removed for a time, but then reinstated to allow our NDK and other native SDKs (such as bugsnag-unity) to function as expected.
Hope this helps.
Thanks for the explanation! My confusion was a result of Android Studio not showing the full set of files in the .aar. But downloading it and opening the aar directly does indeed show that the proguard rules are there. 👍
Goal
Don't crash apps on startup where the
enum.values()
functions are not included in thekeep
list by default. Fixes #2048Design
Included specific Proguard consumer rules for
Telemetry.values()
andErrorType.values()
, ensuring that these members are not removed or obfuscated.Testing
Manually tested with app using fully customized Proguard rules.