问题
I have many external jars inside my Application\WEB-INF\lib
Consider abc.jar as one of my external jar, which i do not want to obfuscate
So can i exclude as like below using filter in my proguard configuration ?
-injars C:\Application\WEB-INF\lib(!abc.jar)
If i do as above for injar option filter means, abc.jar is also getting obfuscated. Please suggest where i am going wrong ? How to avoid obfuscating it ?
回答1:
You should use -injars to specify code that you want to be processed, and -libraryjars to specify underlying code that you want to remain unchanged. Something like this may work:
-injars C:/Application/WEB-INF/lib/mycode.jar
-libraryjars C:/Application/WEB-INF/lib(!mycode.jar;)
Note the semi-colon between the jar name filter and the (empty) class name filter.
来源:https://stackoverflow.com/questions/24057009/how-to-exclude-specific-jars-from-injars-during-obfuscation-using-proguard