1 # This is a configuration file for ProGuard.
2 # http://proguard.sourceforge.net/index.html#manual/usage.html
3 #
4 # Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with
5 # the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and
6 # will be ignored by new version of the Android plugin for Gradle.
7
8 # Optimization is turned off by default. Dex does not like code run
9 # through the ProGuard optimize steps (and performs some
10 # of these optimizations on its own).
11 # Note that if you want to enable optimization, you cannot just
12 # include optimization flags in your own project configuration file;
13 # instead you will need to point to the
14 # "proguard-android-optimize.txt" file instead of this one from your
15 # project.properties file.
16 -dontoptimize
17
18 # Preserve some attributes that may be required for reflection.
19 -keepattributes AnnotationDefault,
20 EnclosingMethod,
21 InnerClasses,
22 RuntimeVisibleAnnotations,
23 RuntimeVisibleParameterAnnotations,
24 RuntimeVisibleTypeAnnotations,
25 Signature
26
27 -keep public class com.google.vending.licensing.ILicensingService
28 -keep public class com.android.vending.licensing.ILicensingService
29 -keep public class com.google.android.vending.licensing.ILicensingService
30 -dontnote com.android.vending.licensing.ILicensingService
31 -dontnote com.google.vending.licensing.ILicensingService
32 -dontnote com.google.android.vending.licensing.ILicensingService
33
34 # For native methods, see https://www.guardsquare.com/manual/configuration/examples#native
35 -keepclasseswithmembernames,includedescriptorclasses class * {
36 native <methods>;
37 }
38
39 # Keep setters in Views so that animations can still work.
40 -keepclassmembers public class * extends android.view.View {
41 void set*(***);
42 *** get*();
43 }
44
45 # We want to keep methods in Activity that could be used in the XML attribute onClick.
46 -keepclassmembers class * extends android.app.Activity {
47 public void *(android.view.View);
48 }
49
50 # For enumeration classes, see https://www.guardsquare.com/manual/configuration/examples#enumerations
51 -keepclassmembers enum * {
52 public static **[] values();
53 public static ** valueOf(java.lang.String);
54 }
55
56 -keepclassmembers class * implements android.os.Parcelable {
57 public static final ** CREATOR;
58 }
59
60 # Preserve annotated Javascript interface methods.
61 -keepclassmembers class * {
62 @android.webkit.JavascriptInterface <methods>;
63 }
64
65 # The support libraries contains references to newer platform versions.
66 # Don't warn about those in case this app is linking against an older
67 # platform version. We know about them, and they are safe.
68 -dontnote android.support.**
69 -dontnote androidx.**
70 -dontwarn android.support.**
71 -dontwarn androidx.**
72
73 # Understand the @Keep support annotation.
74 -keep class android.support.annotation.Keep
75
76 -keep @android.support.annotation.Keep class * {*;}
77
78 -keepclasseswithmembers class * {
79 @android.support.annotation.Keep <methods>;
80 }
81
82 -keepclasseswithmembers class * {
83 @android.support.annotation.Keep <fields>;
84 }
85
86 -keepclasseswithmembers class * {
87 @android.support.annotation.Keep <init>(...);
88 }
89
90 # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
91 -dontnote org.apache.http.**
92 -dontnote android.net.http.**
93
94 # These classes are duplicated between android.jar and core-lambda-stubs.jar.
95 -dontnote java.lang.invoke.**