diff options
Diffstat (limited to 'examples/ant')
-rw-r--r-- | examples/ant/applets.xml | 88 | ||||
-rw-r--r-- | examples/ant/applications1.xml | 15 | ||||
-rw-r--r-- | examples/ant/applications2.xml | 74 | ||||
-rw-r--r-- | examples/ant/applications3.xml | 98 | ||||
-rw-r--r-- | examples/ant/library.xml | 102 | ||||
-rw-r--r-- | examples/ant/midlets.xml | 52 | ||||
-rw-r--r-- | examples/ant/proguard.xml | 89 | ||||
-rw-r--r-- | examples/ant/servlets.xml | 88 |
8 files changed, 0 insertions, 606 deletions
diff --git a/examples/ant/applets.xml b/examples/ant/applets.xml deleted file mode 100644 index 5666f96..0000000 --- a/examples/ant/applets.xml +++ /dev/null @@ -1,88 +0,0 @@ -<!-- This Ant build file illustrates how to process applets. - Usage: ant -f applets.xml --> - -<project name="Applets" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard printseeds="on" - printmapping="out.map" - renamesourcefileattribute="SourceFile"> - - <!-- Specify the input jars, output jars, and library jars. --> - - <injar file="in.jar" /> - <outjar file="out.jar" /> - - <libraryjar file="${java.home}/lib/rt.jar" /> - - <!-- Optionally preserve line numbers in the obfuscated stack traces. - <keepattribute name="LineNumberTable"> - <keepattribute name="SourceFile"> - --> - - <!-- Preserve all annotations. --> - - <keepattribute name="*Annotation*" /> - - <!-- Preserve all public applets. --> - - <keep access="public" extends="java.applet.Applet" /> - - <!-- Preserve all native method names and the names of their classes. --> - - <keepclasseswithmembernames includedescriptorclasses="true"> - <method access="native" /> - </keepclasseswithmembernames> - - <!-- Preserve the methods that are required in all enumeration classes. --> - - <keepclassmembers allowoptimization="true" type="enum"> - <method access="public static" - type="**[]" - name="values" - parameters="" /> - <method access="public static" - type="**" - name="valueOf" - parameters="java.lang.String" /> - </keepclassmembers> - - <!-- 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="java.io.Serializable"> - <field access ="static final" - type ="long" - name ="serialVersionUID" /> - <field access ="static final" - type ="java.io.ObjectStreamField[]" - name ="serialPersistentFields" /> - <method access ="private" - type ="void" - name ="writeObject" - parameters="java.io.ObjectOutputStream" /> - <method access ="private" - type ="void" - name ="readObject" - parameters="java.io.ObjectInputStream" /> - <method type ="java.lang.Object" - name ="writeReplace" - parameters="" /> - <method type ="java.lang.Object" - name ="readResolve" - parameters="" /> - </keepclassmembers> - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> diff --git a/examples/ant/applications1.xml b/examples/ant/applications1.xml deleted file mode 100644 index 6df5789..0000000 --- a/examples/ant/applications1.xml +++ /dev/null @@ -1,15 +0,0 @@ -<!-- This Ant build file illustrates how to process applications, - by including a ProGuard-style configuration file. - Usage: ant -f applications1.xml --> - -<project name="Applications" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard configuration="examples/applications.pro" /> - -</target> - -</project> diff --git a/examples/ant/applications2.xml b/examples/ant/applications2.xml deleted file mode 100644 index 664a9ee..0000000 --- a/examples/ant/applications2.xml +++ /dev/null @@ -1,74 +0,0 @@ -<!-- This Ant build file illustrates how to process applications, - by including ProGuard-style configuration options. - Usage: ant -f applications2.xml --> - -<project name="Applications" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard> - - <!-- Specify the input jars, output jars, and library jars. --> - - -injars in.jar - -outjars out.jar - - -libraryjars ${java.home}/lib/rt.jar - <!-- -libraryjars junit.jar --> - <!-- -libraryjars servlet.jar --> - <!-- -libraryjars jai_core.jar --> - <!-- ... --> - - <!-- Save the obfuscation mapping to a file, and preserve line numbers. --> - - -printmapping out.map - -renamesourcefileattribute SourceFile - -keepattributes SourceFile,LineNumberTable - - <!-- Preserve all annotations. --> - - -keepattributes *Annotation* - - <!-- Preserve all public applications. --> - - -keepclasseswithmembers public class * { - public static void main(java.lang.String[]); - } - - <!-- Preserve all native method names and the names of their classes. --> - - -keepclasseswithmembernames class * { - native <methods>; - } - - <!-- Preserve the methods that are required in all enumeration classes. --> - - -keepclassmembers,allowoptimization enum * { - public static **[] values(); - public static ** valueOf(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 class * implements java.io.Serializable { - static final long serialVersionUID; - static final java.io.ObjectStreamField[] serialPersistentFields; - private void writeObject(java.io.ObjectOutputStream); - private void readObject(java.io.ObjectInputStream); - java.lang.Object writeReplace(); - java.lang.Object readResolve(); - } - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> diff --git a/examples/ant/applications3.xml b/examples/ant/applications3.xml deleted file mode 100644 index 023c2be..0000000 --- a/examples/ant/applications3.xml +++ /dev/null @@ -1,98 +0,0 @@ -<!-- 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/task.properties" - classpath="lib/proguard.jar" /> - - <proguard printseeds="on" - printmapping="out.map" - renamesourcefileattribute="SourceFile"> - - <!-- 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[]" /> - </keepclasseswithmembers> - - <!-- Preserve all native method names and the names of their classes. --> - - <keepclasseswithmembernames includedescriptorclasses="true"> - <method access="native" /> - </keepclasseswithmembernames> - - <!-- Preserve the methods that are required in all enumeration classes. --> - - <keepclassmembers allowoptimization="true" type="enum"> - <method access="public static" - type="**[]" - name="values" - parameters="" /> - <method access="public static" - type="**" - name="valueOf" - parameters="java.lang.String" /> - </keepclassmembers> - - <!-- 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="java.io.Serializable"> - <field access ="static final" - type ="long" - name ="serialVersionUID" /> - <field access ="static final" - type ="java.io.ObjectStreamField[]" - name ="serialPersistentFields" /> - <method access ="private" - type ="void" - name ="writeObject" - parameters="java.io.ObjectOutputStream" /> - <method access ="private" - type ="void" - name ="readObject" - parameters="java.io.ObjectInputStream" /> - <method type ="java.lang.Object" - name ="writeReplace" - parameters="" /> - <method type ="java.lang.Object" - name ="readResolve" - parameters="" /> - </keepclassmembers> - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> diff --git a/examples/ant/library.xml b/examples/ant/library.xml deleted file mode 100644 index 37ceb1a..0000000 --- a/examples/ant/library.xml +++ /dev/null @@ -1,102 +0,0 @@ -<!-- This Ant build file illustrates how to process a program library, - such that it remains usable as a library. - Usage: ant -f library.xml --> - -<project name="Library" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard printmapping="out.map" - renamesourcefileattribute="SourceFile"> - - <!-- Specify the input jars, output jars, and library jars. --> - - <injar file="library.jar" /> - <outjar file="library_out.jar" /> - - <libraryjar file="${java.home}/lib/rt.jar" /> - - <!-- Keep some useful attributes. --> - - <keepattribute name="InnerClasses" /> - <keepattribute name="SourceFile" /> - <keepattribute name="LineNumberTable" /> - <keepattribute name="Deprecated" /> - <keepattribute name="*Annotation*" /> - - <!-- Preserve all public classes, and their public and protected fields - and methods. --> - - <keep access="public"> - <field access="public protected" /> - <method access="public protected" /> - </keep> - - <!-- Preserve all .class method names. --> - - <keepclassmembernames access="public"> - <method type ="java.lang.Class" - name ="class$" - parameters="java.lang.String" /> - <method type ="java.lang.Class" - name ="class$" - parameters="java.lang.String,boolean" /> - </keepclassmembernames> - - <!-- Preserve all native method names and the names of their classes. --> - - <keepclasseswithmembernames includedescriptorclasses="true"> - <method access="native" /> - </keepclasseswithmembernames> - - <!-- Preserve the methods that are required in all enumeration classes. --> - - <keepclassmembers allowoptimization="true" type="enum"> - <method access="public static" - type="**[]" - name="values" - parameters="" /> - <method access="public static" - type="**" - name="valueOf" - parameters="java.lang.String" /> - </keepclassmembers> - - <!-- 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="java.io.Serializable"> - <field access ="final" - type ="long" - name ="serialVersionUID" /> - <field access ="static final" - type ="java.io.ObjectStreamField[]" - name ="serialPersistentFields" /> - <method access ="private" - type ="void" - name ="writeObject" - parameters="java.io.ObjectOutputStream" /> - <method access ="private" - type ="void" - name ="readObject" - parameters="java.io.ObjectInputStream" /> - <method type ="java.lang.Object" - name ="writeReplace" - parameters="" /> - <method type ="java.lang.Object" - name ="readResolve" - parameters="" /> - </keepclassmembers> - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> diff --git a/examples/ant/midlets.xml b/examples/ant/midlets.xml deleted file mode 100644 index fe17277..0000000 --- a/examples/ant/midlets.xml +++ /dev/null @@ -1,52 +0,0 @@ -<!-- This Ant build file illustrates how to process J2ME midlets. - Usage: ant -f midlets.xml --> - -<project name="Midlets" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard microedition="on" - printseeds="on" - printmapping="out.map" - overloadaggressively="on" - repackageclasses="" - allowaccessmodification="on" - renamesourcefileattribute="SourceFile"> - - <!-- On Windows, you can't use mixed case class names, - should you still want to use the preverify tool. - usemixedcaseclassnames="false"> - --> - - <!-- Specify the input jars, output jars, and library jars. --> - - <injar file="in.jar" /> - <outjar file="out.jar" /> - - <libraryjar file="/usr/local/java/wtk2.5.2/lib/midpapi20.jar" /> - <libraryjar file="/usr/local/java/wtk2.5.2/lib/cldcapi11.jar" /> - - <!-- Optionally preserve line numbers in the obfuscated stack traces. - <keepattribute name="LineNumberTable"> - <keepattribute name="SourceFile"> - --> - - <!-- Preserve all public midlets. --> - - <keep access="public" extends="javax.microedition.midlet.MIDlet" /> - - <!-- Preserve all native method names and the names of their classes. --> - - <keepclasseswithmembernames includedescriptorclasses="true"> - <method access="native" /> - </keepclasseswithmembernames> - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> diff --git a/examples/ant/proguard.xml b/examples/ant/proguard.xml deleted file mode 100644 index 18b520b..0000000 --- a/examples/ant/proguard.xml +++ /dev/null @@ -1,89 +0,0 @@ -<!-- 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/task.properties" - classpath="lib/proguard.jar" /> - - <proguard printmapping="proguard.map" - overloadaggressively="on" - repackageclasses="" - renamesourcefileattribute="SourceFile"> - - <!-- 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/kenv.zip" /> - - <!-- Adapt the resource file names, based on the corresponding obfuscated - class names. --> - - <adaptresourcefilenames filter="**.properties,**.gif,**.jpg" /> - <adaptresourcefilecontents filter="proguard/ant/task.properties" /> - - <!-- 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> - <keep access="public" name="proguard.gui.ProGuardGUI"> - <method access ="public static" - type ="void" - name ="main" - parameters="java.lang.String[]" /> - </keep> - <keep access="public" name="proguard.retrace.ReTrace"> - <method access ="public static" - type ="void" - name ="main" - parameters="java.lang.String[]" /> - </keep> - - <!-- 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="org.apache.tools.ant.Project" /> - <method access="public" type="void" name="set*" parameters="***" /> - <method access="public" type="void" name="add*" parameters="***" /> - </keepclassmembers> - - <!-- If we have the Gradle jars, we can properly process the Gradle task. --> - - <keep access="public" name="proguard.gradle.*"> - <method access="public" /> - </keep> - - <!-- If we have kenv.zip, we can process the J2ME WTK plugin. --> - - <keep access="public" name="proguard.wtk.ProGuardObfuscator" /> - - </proguard> -</target> - -</project> diff --git a/examples/ant/servlets.xml b/examples/ant/servlets.xml deleted file mode 100644 index 33ca6ce..0000000 --- a/examples/ant/servlets.xml +++ /dev/null @@ -1,88 +0,0 @@ -<!-- This Ant build file illustrates how to process servlets. - Usage: ant -f servlets.xml --> - -<project name="Servlets" default="obfuscate" basedir="../.."> - -<target name="obfuscate"> - <taskdef resource="proguard/ant/task.properties" - classpath="lib/proguard.jar" /> - - <proguard printseeds="on" - printmapping="proguard.map" - renamesourcefileattribute="SourceFile"> - - <!-- Specify the input jars, output jars, and library jars. --> - - <injar file="in.jar" /> - <outjar file="out.jar" /> - - <libraryjar file="${java.home}/lib/rt.jar" /> - - <!-- Optionally preserve line numbers in the obfuscated stack traces. - <keepattribute name="LineNumberTable"> - <keepattribute name="SourceFile"> - --> - - <!-- Preserve all annotations. --> - - <keepattribute name="*Annotation*" /> - - <!-- Keep all public servlets. --> - - <keep access="public" implements="javax.servlet.Servlet" /> - - <!-- Preserve all native method names and the names of their classes. --> - - <keepclasseswithmembernames includedescriptorclasses="true"> - <method access="native" /> - </keepclasseswithmembernames> - - <!-- Preserve the methods that are required in all enumeration classes. --> - - <keepclassmembers allowoptimization="true" type="enum"> - <method access="public static" - type="**[]" - name="values" - parameters="" /> - <method access="public static" - type="**" - name="valueOf" - parameters="java.lang.String" /> - </keepclassmembers> - - <!-- 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="java.io.Serializable"> - <field access ="static final" - type ="long" - name ="serialVersionUID" /> - <field access ="static final" - type ="java.io.ObjectStreamField[]" - name ="serialPersistentFields" /> - <method access ="private" - type ="void" - name ="writeObject" - parameters="java.io.ObjectOutputStream" /> - <method access ="private" - type ="void" - name ="readObject" - parameters="java.io.ObjectInputStream" /> - <method type ="java.lang.Object" - name ="writeReplace" - parameters="" /> - <method type ="java.lang.Object" - name ="readResolve" - parameters="" /> - </keepclassmembers> - - <!-- Your application may contain more items that need to be preserved; - typically classes that are dynamically created using Class.forName --> - - </proguard> -</target> - -</project> |