X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=core%2Fproguard.flags;h=782d61aa9d81884b68483747afe2a6a6dd23bb8c;hb=54b15b5dd65026f10b25a5d297f6d25c2ab70d8c;hp=afd154879521d3b1f905ef2ec5063790c0427990;hpb=5eac957bddff48437bdc1ffb212b825d2b74556a;p=android-x86%2Fbuild.git diff --git a/core/proguard.flags b/core/proguard.flags index afd154879..782d61aa9 100644 --- a/core/proguard.flags +++ b/core/proguard.flags @@ -1,7 +1,77 @@ # see http://sourceforge.net/tracker/?func=detail&aid=2787465&group_id=54750&atid=474707 -optimizations !code/simplification/arithmetic +-optimizations !code/simplification/cast -allowaccessmodification +# To prevent name conflict in incremental obfuscation. +-useuniqueclassmembernames + +# dex does not like code run through proguard optimize and preverify steps. +-dontoptimize +-dontpreverify + +# Don't obfuscate. We only need dead code striping. +-dontobfuscate + +# Add this flag in your package's own configuration if it's needed. +#-flattenpackagehierarchy + # Some classes in the libraries extend package private classes to chare common functionality # that isn't explicitly part of the API --dontskipnonpubliclibraryclasses +-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers + +# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native +-keepclasseswithmembernames class * { + native ; +} + +# class$ methods are inserted by some compilers to implement .class construct, +# see http://proguard.sourceforge.net/manual/examples.html#library +-keepclassmembernames class * { + java.lang.Class class$(java.lang.String); + java.lang.Class class$(java.lang.String, boolean); +} + +# Keep classes and methods that have the guava @VisibleForTesting annotation +-keep @com.google.common.annotations.VisibleForTesting class * +-keepclassmembers class * { +@com.google.common.annotations.VisibleForTesting *; +} + +# Keep serializable classes and necessary members for serializable classes +# Copied from the ProGuard manual at http://proguard.sourceforge.net. +-keepnames class * implements java.io.Serializable +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + !static !transient ; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +# Please specify classes to be kept explicitly in your package's configuration. +# -keep class * extends android.app.Activity +# -keep class * extends android.view.View +# -keep class * extends android.app.Service +# -keep class * extends android.content.BroadcastReceiver +# -keep class * extends android.content.ContentProvider +# -keep class * extends android.preference.Preference +# -keep class * extends android.app.BackupAgent + +#-keep class * implements android.os.Parcelable { +# public static final android.os.Parcelable$Creator *; +#} + +# The support library contains references to newer platform versions. +# Don't warn about those in case this app is linking against an older +# platform version. We know about them, and they are safe. +# See proguard-android.txt in the SDK package. +-dontwarn android.support.**