-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Proguard/R8 rules #1976
Comments
@Thomas-Vos indeed, it's in our backlog to find out what really needs to be excluded from minification or not, e.g., every public API class, interfaces, classes used in reflection, etc. |
I am using Sentry in a JVM desktop app with R8 obfuscation. With the alpha version mentioned I did not need to add any additional rules for Sentry. |
Yep, nothing needs to be added, it's about removing the not needed rules anymore. |
Yes, what I meant was that I did not need to add any rules at all. The rules in the Android module were not included in my project as I only depend on the Java dependency. |
Since we're serializing things 'by hand' on 6.0.0, I think we can be very lenient in the rules now |
Was fixed with #2031 |
Integration
sentry-android
Build System
Gradle
AGP Version
all
Proguard
Enabled
Version
6.0.0-alpha.4
Steps to Reproduce
The Proguard/R8 rules keep far too many classes. See for example the following file:
https://github.com/getsentry/sentry-java/blob/6.x.x/sentry-android-core/proguard-rules.pro
Lots of those rules seem to be needed for GSON, but GSON was removed in 6.x.x. So the rules can be reduced.
Specifically the following:
sentry-java/sentry-android-core/proguard-rules.pro
Lines 15 to 18 in 4414ba0
This should either be changed to keep specific classes, or just removed completely as GSON is no longer used.
Same for the other rules, some of them seem like they were added for GSON but never removed.
Expected Result
Remove a lot of the rules
Actual Result
Too many classes are kept
The text was updated successfully, but these errors were encountered: