Guardsquare / proguard

ProGuard, Java optimizer and obfuscator
https://www.guardsquare.com/en/products/proguard
GNU General Public License v2.0
2.86k stars 409 forks source link

Proguard 7.0.0 processing multiple applications at once #62

Open fross opened 4 years ago

fross commented 4 years ago

The easiest way is to specify your input jars (and/or wars, ears, zips, and directories) and a single output directory. ProGuard will then reconstruct the input in this directory, using the original jar names. For example, showing just the input and output options:

-injars application1.jar -injars application2.jar -injars application3.jar -outjars processed_applications

After processing, the directory processed_applications will contain processed versions of application jars, with their original names.

EricLafortune commented 4 years ago

I can reproduce the issue, and I imagine it is a regression problem that needs to be investigated. For now you can work around it by specifying the output jars explicitly. ProGuard can only represent a single copy of each file, so you can filter out the manifest files, or with a small trick, temporarily rename them in the filter so they don't clash:

-injars  input1.jar (META-INF/MANIFEST.MF->META-INF/MANIFEST.MF1,**)
-outjars output1.jar(META-INF/MANIFEST.MF1->META-INF/MANIFEST.MF,**)

-injars  input2.jar (META-INF/MANIFEST.MF->META-INF/MANIFEST.MF2,**)
-outjars output2.jar(META-INF/MANIFEST.MF2->META-INF/MANIFEST.MF,**)