|
| 1 | +# https://android.googlesource.com/platform/tools/base/+/refs/heads/studio-master-dev/build-system/gradle-core/src/main/resources/com/android/build/gradle/proguard-common.txt |
| 2 | +-dontusemixedcaseclassnames |
| 3 | +-dontskipnonpubliclibraryclasses |
| 4 | +-verbose |
| 5 | + |
| 6 | +# Preserve some attributes that may be required for reflection. |
| 7 | +-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod |
| 8 | + |
| 9 | +-keep public class com.google.vending.licensing.ILicensingService |
| 10 | +-keep public class com.android.vending.licensing.ILicensingService |
| 11 | +-keep public class com.google.android.vending.licensing.ILicensingService |
| 12 | +-dontnote com.android.vending.licensing.ILicensingService |
| 13 | +-dontnote com.google.vending.licensing.ILicensingService |
| 14 | +-dontnote com.google.android.vending.licensing.ILicensingService |
| 15 | + |
| 16 | +# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native |
| 17 | +-keepclasseswithmembernames,includedescriptorclasses class * { |
| 18 | + native <methods>; |
| 19 | +} |
| 20 | + |
| 21 | +# Keep setters in Views so that animations can still work. |
| 22 | +-keepclassmembers public class * extends android.view.View { |
| 23 | + void set*(***); |
| 24 | + *** get*(); |
| 25 | +} |
| 26 | + |
| 27 | +# We want to keep methods in Activity that could be used in the XML attribute onClick. |
| 28 | +-keepclassmembers class * extends android.app.Activity { |
| 29 | + public void *(android.view.View); |
| 30 | +} |
| 31 | + |
| 32 | +# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations |
| 33 | +-keepclassmembers enum * { |
| 34 | + public static **[] values(); |
| 35 | + public static ** valueOf(java.lang.String); |
| 36 | +} |
| 37 | + |
| 38 | +-keepclassmembers class * implements android.os.Parcelable { |
| 39 | + public static final ** CREATOR; |
| 40 | +} |
| 41 | + |
| 42 | +# Preserve annotated Javascript interface methods. |
| 43 | +-keepclassmembers class * { |
| 44 | + @android.webkit.JavascriptInterface <methods>; |
| 45 | +} |
| 46 | + |
| 47 | +# The support libraries contains references to newer platform versions. |
| 48 | +# Don't warn about those in case this app is linking against an older |
| 49 | +# platform version. We know about them, and they are safe. |
| 50 | +-dontnote android.support.** |
| 51 | +-dontnote androidx.** |
| 52 | +-dontwarn android.support.** |
| 53 | +-dontwarn androidx.** |
| 54 | + |
| 55 | +# This class is deprecated, but remains for backward compatibility. |
| 56 | +-dontwarn android.util.FloatMath |
| 57 | + |
| 58 | +# Understand the @Keep support annotation. |
| 59 | +-keep class android.support.annotation.Keep |
| 60 | +-keep class androidx.annotation.Keep |
| 61 | + |
| 62 | +-keep @android.support.annotation.Keep class * {*;} |
| 63 | +-keep @androidx.annotation.Keep class * {*;} |
| 64 | + |
| 65 | +-keepclasseswithmembers class * { |
| 66 | + @android.support.annotation.Keep <methods>; |
| 67 | +} |
| 68 | + |
| 69 | +-keepclasseswithmembers class * { |
| 70 | + @androidx.annotation.Keep <methods>; |
| 71 | +} |
| 72 | + |
| 73 | +-keepclasseswithmembers class * { |
| 74 | + @android.support.annotation.Keep <fields>; |
| 75 | +} |
| 76 | + |
| 77 | +-keepclasseswithmembers class * { |
| 78 | + @androidx.annotation.Keep <fields>; |
| 79 | +} |
| 80 | + |
| 81 | +-keepclasseswithmembers class * { |
| 82 | + @android.support.annotation.Keep <init>(...); |
| 83 | +} |
| 84 | + |
| 85 | +-keepclasseswithmembers class * { |
| 86 | + @androidx.annotation.Keep <init>(...); |
| 87 | +} |
| 88 | + |
| 89 | +# These classes are duplicated between android.jar and org.apache.http.legacy.jar. |
| 90 | +-dontnote org.apache.http.** |
| 91 | +-dontnote android.net.http.** |
| 92 | + |
| 93 | +# These classes are duplicated between android.jar and core-lambda-stubs.jar. |
| 94 | +-dontnote java.lang.invoke.** |
0 commit comments