am 57453519
: Split out proguard_basic_keeps.flags
* commit '57453519084feb13f8a2c00b6985b32427a06b5a': Split out proguard_basic_keeps.flags
This commit is contained in:
commit
82574cb101
3 changed files with 58 additions and 55 deletions
|
@ -401,6 +401,8 @@ endif
|
|||
ifneq ($(strip $(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS))$(filter android.test.runner,$(LOCAL_JAVA_LIBRARIES))),)
|
||||
proguard_flags := $(proguard_flags) -include $(BUILD_SYSTEM)/proguard_tests.flags
|
||||
endif # test package
|
||||
else # LOCAL_PROGUARD_ENABLED is nosystem
|
||||
proguard_flags += -include $(BUILD_SYSTEM)/proguard_basic_keeps.flags
|
||||
endif # LOCAL_PROGUARD_ENABLED is not nosystem
|
||||
|
||||
ifneq ($(LOCAL_PROGUARD_ENABLED),)
|
||||
|
|
|
@ -20,58 +20,4 @@
|
|||
# that isn't explicitly part of the API
|
||||
-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 <methods>;
|
||||
}
|
||||
|
||||
# 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 <fields>;
|
||||
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.**
|
||||
-include proguard_basic_keeps.flags
|
||||
|
|
55
core/proguard_basic_keeps.flags
Normal file
55
core/proguard_basic_keeps.flags
Normal file
|
@ -0,0 +1,55 @@
|
|||
# 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 <methods>;
|
||||
}
|
||||
|
||||
# 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 <fields>;
|
||||
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.**
|
Loading…
Reference in a new issue