Reputation: 1211
I don't understand that why we need to use the key word "-keep" in proguard.cfg. The purpose of proguard is to confuse people who try to read the source code. In my opinion, we should try to make all codes confused, but why we use "-keep" to keep some source code unchanged.
Upvotes: 0
Views: 187
Reputation: 45686
You're right, for best optimization and obfuscation results, you should use -keep as sparingly as possible. However, if the code is performing reflection, the options may be necessary to preserve specific classes, fields, and methods with their original names. For instance, an external configuration file may contain class names, which can only work if the classes are still present.
Upvotes: 1