Skip to content
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

Readme contains bad R8 advice #572

Open
connyduck opened this issue Jun 10, 2023 · 1 comment · May be fixed by #635
Open

Readme contains bad R8 advice #572

connyduck opened this issue Jun 10, 2023 · 1 comment · May be fixed by #635

Comments

@connyduck
Copy link

R8 and ProGuard rules are bundled into SSO. The bundled rules do not cover enabled obfuscation. Therefore it is recommended to add -dontobfuscate to your app-specific proguard rules.

Setting -dontobfuscate on a whole app is a bad idea, as it will unnecessarily increase the app size.

There are exactly two possibilities:

  1. This library works in a consuming app that has R8 fullmode and obfuscation turned on. In this case, the text above is wrong and should be changed.

  2. The library does not work in a consuming app that has R8 fullmode and obfuscation turned on. In this case, the R8 rules provided by the library should be improved until it does. Offloading this work to consuming developers is lazy and bad practice.

As fas as I can tell we are dealing with 1) here.

So I suggest altering the Readme to say the following:

The rules needed to make SSO work with R8 and ProGuard are bundled into the library.

With R8 full mode being enabled by default since AGP 8.0, you will probably need to handle following app-specific rules yourself (or disable full mode):
...

(Although I don't understand why you would want to repeat Gson/Retrofit rules, if devs have a problem with them they can go to the respective docs themselves)

@stefan-niedermann
Copy link
Member

@connyduck would you mind open a PR with the proposed documentation changes?

@connyduck connyduck linked a pull request Jan 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants