How to obfuscate a library jar in ProGuard?

I have a can that uses another can as a library. I want them both to be confused.
Quoting ProGuard documentation :

ProGuard requires libraries (or wars, ears, zippers or catalogs) of input cans that must be specified. These are essentially the libraries you need to compile the code. ProGuard uses them to recover class dependencies that are necessary for proper handling. Library tanks always remain unchanged . You should still put them in the class path of your final app.

How can I change this behavior?

UPDATE:
I canโ€™t use incremental obfuscation because I donโ€™t know what to specify as entry points for the library.

+4
source share
1 answer

You just need to specify your two banks as input cans (with the -injars option). Then they will both be confused. Any other banks, such as a run-time bank, are library banks (specified with the -libraryjars option). ProGuard needs their proper code processing, but it leaves them unchanged.

+7
source

Source: https://habr.com/ru/post/1491895/


All Articles