Proguard shrinking and optimizing without obfuscation

前提是你 提交于 2021-02-08 03:28:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!