Home | History | Annotate | Download | only in examples
      1 #
      2 # This ProGuard configuration file illustrates how to process ProGuard
      3 # (including its main application, its GUI, its Ant task, and its WTK plugin),
      4 # and the ReTrace tool, all in one go.
      5 # Configuration files for typical applications will be very similar.
      6 # Usage:
      7 #     java -jar proguard.jar @proguardall.pro
      8 #
      9 
     10 # Specify the input jars, output jars, and library jars.
     11 # We'll read all jars from the lib directory, process them, and write the
     12 # processed jars to a new out directory.
     13 
     14 -injars  ../lib
     15 -outjars out
     16 
     17 # You may have to adapt the paths below.
     18 
     19 -libraryjars <java.home>/lib/rt.jar
     20 -libraryjars /usr/local/java/ant/lib/ant.jar
     21 -libraryjars /usr/local/java/wtk2.5.2/wtklib/kenv.zip
     22 
     23 # Allow methods with the same signature, except for the return type,
     24 # to get the same obfuscation name.
     25 
     26 -overloadaggressively
     27 
     28 # Put all obfuscated classes into the nameless root package.
     29 
     30 -repackageclasses ''
     31 
     32 # Adapt the names and contents of the resource files.
     33 
     34 -adaptresourcefilenames    **.properties,**.gif,**.jpg
     35 -adaptresourcefilecontents proguard/ant/task.properties
     36 
     37 # The main entry points.
     38 
     39 -keep public class proguard.ProGuard {
     40     public static void main(java.lang.String[]);
     41 }
     42 
     43 -keep public class proguard.gui.ProGuardGUI {
     44     public static void main(java.lang.String[]);
     45 }
     46 
     47 -keep public class proguard.retrace.ReTrace {
     48     public static void main(java.lang.String[]);
     49 }
     50 
     51 # If we have ant.jar, we can properly process the Ant task.
     52 
     53 -keep,allowobfuscation class proguard.ant.*
     54 -keepclassmembers public class proguard.ant.* {
     55     <init>(org.apache.tools.ant.Project);
     56     public void set*(***);
     57     public void add*(***);
     58 }
     59 
     60 # If we have kenv.zip, we can process the J2ME WTK plugin.
     61 
     62 -keep public class proguard.wtk.ProGuardObfuscator
     63