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            printseeds="on"
12            printmapping="out.map"
13            overloadaggressively="on"
14            repackageclasses=""
15            allowaccessmodification="on"
16            renamesourcefileattribute="SourceFile">
17
18            <!-- On Windows, you can't use mixed case class names,
19                 should you still want to use the preverify tool.
20            usemixedcaseclassnames="false">
21            -->
22
23    <!-- Specify the input jars, output jars, and library jars. -->
24
25    <injar  file="in.jar" />
26    <outjar file="out.jar" />
27
28    <libraryjar file="/usr/local/java/wtk2.5.2/lib/midpapi20.jar" />
29    <libraryjar file="/usr/local/java/wtk2.5.2/lib/cldcapi11.jar" />
30
31    <!-- Optionally preserve line numbers in the obfuscated stack traces.
32    <keepattribute name="LineNumberTable">
33    <keepattribute name="SourceFile">
34    -->
35
36    <!-- Preserve all public midlets. -->
37
38    <keep access="public" extends="javax.microedition.midlet.MIDlet" />
39
40    <!-- Preserve all native method names and the names of their classes. -->
41
42    <keepclasseswithmembernames includedescriptorclasses="true">
43      <method access="native" />
44    </keepclasseswithmembernames>
45
46    <!-- Your application may contain more items that need to be preserved;
47         typically classes that are dynamically created using Class.forName -->
48
49   </proguard>
50</target>
51
52</project>
53