1#
2# This ProGuard configuration file illustrates how to process J2ME midlets.
3# Usage:
4#     java -jar proguard.jar @midlets.pro
5#
6
7# Specify the input jars, output jars, and library jars.
8
9-injars  in.jar
10-outjars out.jar
11
12-libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
13-libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
14
15# Preverify the code suitably for Java Micro Edition.
16
17-microedition
18
19# Allow methods with the same signature, except for the return type,
20# to get the same obfuscation name.
21
22-overloadaggressively
23
24# Put all obfuscated classes into the nameless root package.
25
26-repackageclasses ''
27
28# Allow classes and class members to be made public.
29
30-allowaccessmodification
31
32# On Windows, you can't use mixed case class names,
33# should you still want to use the preverify tool.
34#
35# -dontusemixedcaseclassnames
36
37# Save the obfuscation mapping to a file, so you can de-obfuscate any stack
38# traces later on.
39
40-printmapping out.map
41
42# You can keep a fixed source file attribute and all line number tables to
43# get stack traces with line numbers.
44
45#-renamesourcefileattribute SourceFile
46#-keepattributes SourceFile,LineNumberTable
47
48# You can print out the seeds that are matching the keep options below.
49
50#-printseeds out.seeds
51
52# Preserve all public midlets.
53
54-keep public class * extends javax.microedition.midlet.MIDlet
55
56# Preserve all native method names and the names of their classes.
57
58-keepclasseswithmembernames class * {
59    native <methods>;
60}
61
62# Your midlet may contain more items that need to be preserved; 
63# typically classes that are dynamically created using Class.forName:
64
65# -keep public class mypackage.MyClass
66# -keep public interface mypackage.MyInterface
67# -keep public class * implements mypackage.MyInterface
68