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/gradle-1.3/lib/plugins/gradle-plugins-1.3.jar 22-libraryjars /usr/local/java/gradle-1.3/lib/gradle-base-services-1.3.jar 23-libraryjars /usr/local/java/gradle-1.3/lib/gradle-core-1.3.jar 24-libraryjars /usr/local/java/gradle-1.3/lib/groovy-all-1.8.6.jar 25-libraryjars /usr/local/java/wtk2.5.2/wtklib/kenv.zip 26 27# Allow methods with the same signature, except for the return type, 28# to get the same obfuscation name. 29 30-overloadaggressively 31 32# Put all obfuscated classes into the nameless root package. 33 34-repackageclasses '' 35 36# Adapt the names and contents of the resource files. 37 38-adaptresourcefilenames **.properties,**.gif,**.jpg 39-adaptresourcefilecontents proguard/ant/task.properties 40 41# The main entry points. 42 43-keep public class proguard.ProGuard { 44 public static void main(java.lang.String[]); 45} 46 47-keep public class proguard.gui.ProGuardGUI { 48 public static void main(java.lang.String[]); 49} 50 51-keep public class proguard.retrace.ReTrace { 52 public static void main(java.lang.String[]); 53} 54 55# If we have ant.jar, we can properly process the Ant task. 56 57-keep,allowobfuscation class proguard.ant.* 58-keepclassmembers public class proguard.ant.* { 59 <init>(org.apache.tools.ant.Project); 60 public void set*(***); 61 public void add*(***); 62} 63 64# If we have the Gradle jars, we can properly process the Gradle task. 65 66-keep public class proguard.gradle.* { 67 public *; 68} 69 70# If we have kenv.zip, we can process the J2ME WTK plugin. 71 72-keep public class proguard.wtk.ProGuardObfuscator 73