blob: e42eb39a954f4d43e65a4eaf06964c396bc73b68 [file] [log] [blame]
<!-- This Ant build file illustrates how to process applications,
using a full-blown XML configuration.
Usage: ant -f applications3.xml -->
<project name="Applications" default="obfuscate" basedir="../..">
<target name="obfuscate">
<taskdef resource="proguard/ant/"
classpath="lib/proguard.jar" />
<proguard printseeds="on"
<!-- Specify the input jars, output jars, and library jars. -->
<injar file="in.jar" />
<outjar file="out.jar" />
<libraryjar file="${java.home}/lib/rt.jar" />
<!-- libraryjar file="junit.jar" / -->
<!-- libraryjar file="servlet.jar" / -->
<!-- libraryjar file="jai_core.jar" / -->
<!-- ... / -->
<!-- Preserve line numbers in the obfuscated stack traces. -->
<keepattribute name="LineNumberTable" />
<keepattribute name="SourceFile" />
<!-- Preserve all annotations. -->
<keepattribute name="*Annotation*" />
<!-- Preserve all public applications. -->
<keepclasseswithmembers access="public">
<method access ="public static"
type ="void"
name ="main"
parameters="java.lang.String[]" />
<!-- Preserve all native method names and the names of their classes. -->
<method access="native" />
<!-- Preserve the methods that are required in all enumeration classes. -->
<keepclassmembers extends="java.lang.Enum">
<method access="public static"
parameters="" />
<method access="public static"
parameters="java.lang.String" />
<!-- Explicitly preserve all serialization members. The Serializable
interface is only a marker interface, so it wouldn't save them.
You can comment this out if your library doesn't use serialization.
If your code contains serializable classes that have to be backward
compatible, please refer to the manual. -->
<keepclassmembers implements="">
<field access ="static final"
type ="long"
name ="serialVersionUID" />
<field access ="static final"
type ="[]"
name ="serialPersistentFields" />
<method access ="private"
type ="void"
name ="writeObject"
parameters="" />
<method access ="private"
type ="void"
name ="readObject"
parameters="" />
<method type ="java.lang.Object"
name ="writeReplace"
parameters="" />
<method type ="java.lang.Object"
name ="readResolve"
parameters="" />
<!-- Your application may contain more items that need to be preserved;
typically classes that are dynamically created using Class.forName -->