1 <!-- This Ant build file illustrates how to process J2ME midlets. 2 Usage: ant -f midlets.xml --> 3 4 <project name="Midlets" default="obfuscate" basedir="../.."> 5 6 <target name="obfuscate"> 7 <taskdef resource="proguard/ant/task.properties" 8 classpath="lib/proguard.jar" /> 9 10 <proguard microedition="on" 11 overloadaggressively="on" 12 repackageclasses="" 13 allowaccessmodification="on" 14 printseeds="on"> 15 16 <!-- On Windows, you can't use mixed case class names, 17 for the sake of the preverify tool. 18 usemixedcaseclassnames="false"> 19 --> 20 21 <!-- Specify the input jars, output jars, and library jars. --> 22 23 <injar file="in.jar" /> 24 <outjar file="out.jar" /> 25 26 <libraryjar file="/usr/local/java/wtk2.1/lib/midpapi20.jar" /> 27 <libraryjar file="/usr/local/java/wtk2.1/lib/cldcapi11.jar" /> 28 29 <!-- Preserve all public midlets. --> 30 31 <keep access="public" extends="javax.microedition.midlet.MIDlet" /> 32 33 <!-- Preserve all native method names and the names of their classes. --> 34 35 <keepclasseswithmembernames> 36 <method access="native" /> 37 </keepclasseswithmembernames> 38 39 <!-- Your application may contain more items that need to be preserved; 40 typically classes that are dynamically created using Class.forName --> 41 42 </proguard> 43 </target> 44 45 </project> 46