kotlinx.serialization
kotlinx.serialization copied to clipboard
Current proguard documentation is unclear
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.
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?
Libraries like OkHttp come bundled with proguard rules. Shouldn't serialization lib do this, too?
@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.