简体   繁体   中英

How to exclude specific jars from injars during obfuscation using proguard?

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM