-
Notifications
You must be signed in to change notification settings - Fork 78
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
Include proguard consumer directives for R8 compatibility #72
Comments
I have a PR ready but lack permissions. :) |
@spacemase thanks for raising this. Can you explain what issue you face with respect to permissions? You should be able to work on a fork and create a PR. We can check it out and approve to run it. |
I'm also having issues with this, do we have an ETA when this will be merged into a release? |
@bilalhaidercc @spacemase seems to have a solution and it would be great to checkout his solution. |
@spacemase will you be creating the PR? |
For now the following works for me (Put the following in
Would be nice to support kotlinx serialization instead of GSON (cc #24) |
Please note that rules for gson should not go into the consumer rules for this library, as they have been added to gson (https://github.com/google/gson/blob/main/gson/src/main/resources/META-INF/proguard/gson.pro). The most recent changes have not been released yet, and I will follow up on that. |
Checklist
Describe the problem you'd like to have solved
Developers using R8 have encountered minification issues with the use of GSON in JWTDecode.Android - #49
Describe the ideal solution
JWTDecode.Android can include proguard directives in a consumer configuration file, which will advertise the issue and solve it for most consumers of the library.
In a new consumer proguard config, include the GSON proguard rules for R8 compiled projects.
https://github.com/google/gson/blob/f72824e2e4d0b719331a040a945876145b7c5acc/examples/android-proguard-example/proguard.cfg#L28
Alternatives and current workarounds
Current workaround is for the consuming project to include the proguard directives for R8 compilers themselves, but that is only likely to happen after they discover the issue, research and locate the solution.
Additional context
Users will discover the issue via a crash report in their minified release builds similar to this:
The text was updated successfully, but these errors were encountered: