nextcloud / nextcloud/Android-SingleSignOn

Readme contains bad R8 advice

Open
#572 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
74
Forks
36
Avg merge
1d 19h
Merged PRs (30d)
17

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the README guidance alongside lib/consumer-proguard-rules.pro and the linked R8 full-mode and AGP references. Determine whether the library works with R8 full mode and obfuscation enabled; done means the README accurately states the required app-specific rules, or the bundled rules are updated if needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.