I have a jar that uses another jar as a library. I want them both to be obfuscated.
Quoting ProGuard documentation:
ProGuard requires the library jars (or wars, ears, zips, or directories) of the input jars to be specified. These are essentially the libraries that you would need for compiling the code. ProGuard uses them to reconstruct the class dependencies that are necessary for proper processing. The library jars themselves always remain unchanged. You should still put them in the class path of your final application.
How can I change this behavior?
UPDATE:
I cannot use incremental obfuscation because I wouldn't know what to specify as entry points for the library jar.
You just need to specify your two jars as input jars (with the option -injars
). They will then both be obfuscated. Any other jars, such as the run-time jar, are library jars (specified with the option -libraryjars
). ProGuard needs them to properly process your code, but it leaves them unchanged.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With