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

Current proguard documentation is unclear #1899

Closed
fsgjlp opened this issue Apr 11, 2022 · 3 comments
Closed

Current proguard documentation is unclear #1899

fsgjlp opened this issue Apr 11, 2022 · 3 comments
Assignees

Comments

@fsgjlp
Copy link

fsgjlp commented Apr 11, 2022

Here are two different versions of proguard file with different rules and descriptions. Please make them similar, or better yet, keep only one version of proguard rules.

@Whathecode
Copy link
Contributor

Whathecode commented Apr 12, 2022

They do different things, though. That's why they are different.

The first one "keeps serializers for all serializable classes that are retained after shrinking". This is what I imagine fits the bill for the majority of users out there, and why it is currently listed first.

If you want more shrinking, this requires more configuration:

In case you want to exclude serializable classes that are used, but never serialized at runtime

Perhaps it would help if you could elaborate what is unclear about this. Requesting to make them similar ignores the fact that they are different for a reason. How do you feel we can make this distinction clearer?

@digitalheir
Copy link

Libraries like OkHttp come bundled with proguard rules. Shouldn't serialization lib do this, too?

@shanshin
Copy link
Contributor

@digitalheir, I think it's worth considering this possibility.

However, the rules from okhttp are significantly different, they mostly contain dontwarn. The rules from the library are stricter, they control the obfuscation and shrinking of classes. Also, in general, it is impossible to solve the problem with custom companion objects, you will need to add your own rules.

shanshin added a commit that referenced this issue Nov 8, 2022
Resolves #1121
Resolves #1899
Resolves #1900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants