问题
In my app I have library project dependency with lots of unused methods fields and classes. Since this is a third-party library I don't want to remove all unused classes and methods by myself due it's future updates. I'm trying to use proguard for this but
-dontobfuscate
will only exclude whole project from any optimisations shrinking and obfuscation. Is it possible to skip obfuscation step?
回答1:
You should generally apply ProGuard to the combination of your app and its libraries. This provides the best results in terms of shrinking, optimization, and obfuscation. The libraries will be obfuscated, but if you get a new version, you need to rebuild the entire app anyway.
If you want to shrink, optimize, and obfuscate a single library, you can have a look at the ProGuard manual > Examples > A typical library.
来源:https://stackoverflow.com/questions/27438296/proguard-shrinking-and-optimizing-without-obfuscation