blob: 447e7c557c0b806eb4b841fa68676cf6824c0f35 [file] [log] [blame]
Joe Onorato2daa2b32009-08-30 13:39:24 -07001# see http://sourceforge.net/tracker/?func=detail&aid=2787465&group_id=54750&atid=474707
2-optimizations !code/simplification/arithmetic
Ying Wang3b2bdf12010-02-01 09:51:23 -08003-optimizations !code/simplification/cast
Joe Onorato2daa2b32009-08-30 13:39:24 -07004-allowaccessmodification
5
Ying Wang3b2bdf12010-02-01 09:51:23 -08006# To prevent name conflict in incremental obfuscation.
7-useuniqueclassmembernames
8
9# dex does not like code run through proguard optimize and preverify steps.
10-dontoptimize
11-dontpreverify
12
13# Don't obfuscate. We only need dead code striping.
14-dontobfuscate
15
16# Add this flag in your package's own configuration if it's needed.
17#-flattenpackagehierarchy
18
Joe Onorato2daa2b32009-08-30 13:39:24 -070019# Some classes in the libraries extend package private classes to chare common functionality
20# that isn't explicitly part of the API
Ying Wang3b2bdf12010-02-01 09:51:23 -080021-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers
22
23# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
24-keepclassmembers enum * {
25 public static **[] values();
26 public static ** valueOf(java.lang.String);
27}
28
29# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
30-keepclasseswithmembernames class * {
31 native <methods>;
32}
33
34# class$ methods are inserted by some compilers to implement .class construct,
35# see http://proguard.sourceforge.net/manual/examples.html#library
36-keepclassmembernames class * {
37 java.lang.Class class$(java.lang.String);
38 java.lang.Class class$(java.lang.String, boolean);
39}
40
Bjorn Bringert4f85d002010-03-09 14:37:21 +000041# Keep classes and methods that have the guava @VisibleForTesting annotation
42-keep @com.google.common.annotations.VisibleForTesting class *
43-keepclassmembers class * {
44@com.google.common.annotations.VisibleForTesting *;
45}
46
Hung-ying Tyanddefdef2010-08-10 17:50:25 +080047# Keep serializable classes and necessary members for serializable classes
48# Copied from the ProGuard manual at http://proguard.sourceforge.net.
49-keepnames class * implements java.io.Serializable
50-keepclassmembers class * implements java.io.Serializable {
51 static final long serialVersionUID;
52 private static final java.io.ObjectStreamField[] serialPersistentFields;
53 !static !transient <fields>;
54 private void writeObject(java.io.ObjectOutputStream);
55 private void readObject(java.io.ObjectInputStream);
56 java.lang.Object writeReplace();
57 java.lang.Object readResolve();
58}
59
Ying Wang3b2bdf12010-02-01 09:51:23 -080060# Please specify classes to be kept explicitly in your package's configuration.
61# -keep class * extends android.app.Activity
62# -keep class * extends android.view.View
63# -keep class * extends android.app.Service
64# -keep class * extends android.content.BroadcastReceiver
65# -keep class * extends android.content.ContentProvider
66# -keep class * extends android.preference.Preference
67# -keep class * extends android.app.BackupAgent
68
69#-keep class * implements android.os.Parcelable {
70# public static final android.os.Parcelable$Creator *;
71#}
72
73