2013-08-22 09:32:49 +08:00
|
|
|
# We have moved -dontobfuscate and -dontoptimize to the makefiles.
|
2010-02-02 01:51:23 +08:00
|
|
|
# dex does not like code run through proguard optimize and preverify steps.
|
2013-08-22 09:32:49 +08:00
|
|
|
# -dontoptimize
|
2010-02-02 01:51:23 +08:00
|
|
|
-dontpreverify
|
|
|
|
|
|
|
|
# Don't obfuscate. We only need dead code striping.
|
2013-08-22 09:32:49 +08:00
|
|
|
# -dontobfuscate
|
2010-02-02 01:51:23 +08:00
|
|
|
|
|
|
|
# Add this flag in your package's own configuration if it's needed.
|
|
|
|
#-flattenpackagehierarchy
|
|
|
|
|
2013-05-31 01:45:46 +08:00
|
|
|
# Keep classes and methods that have the guava @VisibleForTesting annotation
|
2015-07-24 16:48:19 +08:00
|
|
|
-keep @**.VisibleForTesting class *
|
2013-05-31 01:45:46 +08:00
|
|
|
-keepclassmembers class * {
|
2015-07-24 16:48:19 +08:00
|
|
|
@**.VisibleForTesting *;
|
2013-05-31 01:45:46 +08:00
|
|
|
}
|
2010-02-02 01:51:23 +08:00
|
|
|
|
2019-03-27 00:48:28 +08:00
|
|
|
# Understand the @Keep support annotation.
|
|
|
|
-keep class android.support.annotation.Keep
|
|
|
|
-keep class androidx.annotation.Keep
|
|
|
|
|
|
|
|
-keep @android.support.annotation.Keep class * {*;}
|
|
|
|
-keep @androidx.annotation.Keep class * {*;}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@android.support.annotation.Keep <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@androidx.annotation.Keep <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@android.support.annotation.Keep <fields>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@androidx.annotation.Keep <fields>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@android.support.annotation.Keep <init>(...);
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@androidx.annotation.Keep <init>(...);
|
|
|
|
}
|
|
|
|
|
2013-05-18 01:02:00 +08:00
|
|
|
-include proguard_basic_keeps.flags
|