blob: 18b520b42e2897fc928f1edd7dba60e10ae9678e [file] [log] [blame]
<!-- This Ant build file illustrates how to process ProGuard (including its
main application, its GUI, its Ant task, and its WTK plugin), and the
ReTrace tool, all in one go.
Usage: ant -f proguard.xml -->
<project name="ProGuard" default="obfuscate" basedir="../..">
<target name="obfuscate">
<taskdef resource="proguard/ant/"
classpath="lib/proguard.jar" />
<proguard printmapping=""
<!-- Specify the input jars, output jars, and library jars. -->
<injar file="lib/proguard.jar" />
<injar file="lib/proguardgui.jar" filter="!META-INF/**" />
<injar file="lib/retrace.jar" filter="!META-INF/**" />
<outjar file="examples/ant/proguard_out.jar" />
<libraryjar file="${java.home}/lib/rt.jar" />
<libraryjar file="/usr/local/java/ant/lib/ant.jar" />
<libraryjar file="/usr/local/java/gradle-2.1/lib/plugins/gradle-plugins-2.1.jar" />
<libraryjar file="/usr/local/java/gradle-2.1/lib/gradle-base-services-2.1.jar" />
<libraryjar file="/usr/local/java/gradle-2.1/lib/gradle-base-services-groovy-2.1.jar" />
<libraryjar file="/usr/local/java/gradle-2.1/lib/gradle-core-2.1.jar" />
<libraryjar file="/usr/local/java/gradle-2.1/lib/groovy-all-2.3.6.jar" />
<libraryjar file="/usr/local/java/wtk2.5.2/wtklib/" />
<!-- Adapt the resource file names, based on the corresponding obfuscated
class names. -->
<adaptresourcefilenames filter="**.properties,**.gif,**.jpg" />
<adaptresourcefilecontents filter="proguard/ant/" />
<!-- Optionally preserve line numbers in the obfuscated stack traces.
<keepattribute name="LineNumberTable">
<keepattribute name="SourceFile">
<!-- The main seeds: ProGuard and its companion tool ReTrace. -->
<keep access="public" name="proguard.ProGuard">
<method access ="public static"
type ="void"
name ="main"
parameters="java.lang.String[]" />
<keep access="public" name="proguard.gui.ProGuardGUI">
<method access ="public static"
type ="void"
name ="main"
parameters="java.lang.String[]" />
<keep access="public" name="proguard.retrace.ReTrace">
<method access ="public static"
type ="void"
name ="main"
parameters="java.lang.String[]" />
<!-- If we have ant.jar, we can properly process the Ant task. -->
<keeppackagename name="proguard.ant" />
<keep name="proguard.ant.*" allowobfuscation="true" />
<keepclassmembers access="public" name="proguard.ant.*">
<constructor parameters="" />
<method access="public" type="void" name="set*" parameters="***" />
<method access="public" type="void" name="add*" parameters="***" />
<!-- If we have the Gradle jars, we can properly process the Gradle task. -->
<keep access="public" name="proguard.gradle.*">
<method access="public" />
<!-- If we have, we can process the J2ME WTK plugin. -->
<keep access="public" name="proguard.wtk.ProGuardObfuscator" />