• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.1/lib/midpapi20.jar
13-libraryjars /usr/local/java/wtk2.1/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# Preserve all public midlets.
38
39-keep public class * extends javax.microedition.midlet.MIDlet
40
41# Print out a list of what we're preserving.
42
43-printseeds
44
45# Preserve all native method names and the names of their classes.
46
47-keepclasseswithmembernames class * {
48    native <methods>;
49}
50
51# Your midlet may contain more items that need to be preserved;
52# typically classes that are dynamically created using Class.forName:
53
54# -keep public class mypackage.MyClass
55# -keep public interface mypackage.MyInterface
56# -keep public class * implements mypackage.MyInterface
57