RonPringadi
RonPringadi

Reputation: 1494

How to make Proguard to obfuscate jars within a jar file

I have a run-able java jar file let's call it masterProgram.jar. Inside this masterProgram.jar if I extract it using 7Zip or WinRAR there are other jars, lets call it lib1.jar, lib2.jar.

Proguard managed to obfuscated the master jar, but when I look-inside the lib jars are not. and because of this the program (masterProgram.jar) breaks at a certain point. I also already set overloadaggressively option in my condig.

I'm calling the proguard.jar through an ant build.xml. and here is my config file config.proguard

-injars 'masterProgram.jar'

-target 1.7
-dontshrink

-dontoptimize
-allowaccessmodification
-printmapping dataprintmap.txt
-overloadaggressively
-useuniqueclassmembernames
-repackageclasses ''
-keepattributes Exceptions,Innerclasses,Signature,Deprecated,*Annotation*,Synthetic
-renamesourcefileattribute SourceFile
-dontnote
-printseeds dataseed.txt
-dontskipnonpubliclibraryclasses

Upvotes: 0

Views: 917

Answers (1)

Louis Wasserman
Louis Wasserman

Reputation: 198103

Jars inside jars are not really how jars are supposed to work. You'll need to rearrange things to make ProGuard able to deal with things. ProGuard has no way to deal with jars in jars because that's not how jars are intended to be used.

Upvotes: 2

Related Questions