1
- -verbose
1
+ # This is a configuration file for ProGuard.
2
+ # http://proguard.sourceforge.net/index.html#manual/usage.html
2
3
-allowaccessmodification
4
+ -dontpreverify
3
5
-dontusemixedcaseclassnames
4
6
-dontskipnonpubliclibraryclasses
5
- -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
6
- -dump class_files.txt
7
+ -verbose
7
8
-printseeds seeds.txt
8
9
-printusage unused.txt
9
10
-printmapping mapping.txt
10
- -keepattributes *Annotation*,SourceFile,LineNumberTable,Signature
11
- -renamesourcefileattribute SourceFile
12
- -dontwarn java.util.concurrent.Flow*
13
- -keep class **.R$* {*;}
11
+
12
+ # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
14
13
-keepclasseswithmembernames class * {
15
- native <methods>;
14
+ native <methods>;
16
15
}
16
+
17
+ # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
17
18
-keepclassmembers enum * {
18
- public static **[] values();
19
- public static ** valueOf(java.lang.String);
19
+ public static **[] values();
20
+ public static ** valueOf(java.lang.String);
20
21
}
21
- -keepclassmembers class * {
22
- void *(**On*Event);
23
- void *(**On*Listener) ;
22
+
23
+ -keepclassmembers class * implements android.os.Parcelable {
24
+ public static final android.os.Parcelable$Creator CREATOR ;
24
25
}
25
26
27
+ # Assume isInEditMode() always return false in release builds so they can be pruned
28
+ -assumevalues public class * extends android.view.View {
29
+ boolean isInEditMode() return false;
30
+ }
26
31
27
- # Serializable
28
- -keep class * implements android.os.Parcelable {
29
- public static final android.os.Parcelable$Creator *;
32
+ -keepclassmembers class **.R$* {
33
+ public static <fields>;
30
34
}
31
- -keepclassmembers class * implements java.io.Serializable {
32
- static final long serialVersionUID;
33
- private static final java.io.ObjectStreamField[] serialPersistentFields;
34
- !static !transient <fields>;
35
- !private <fields>;
36
- !private <methods>;
37
- private void writeObject(java.io.ObjectOutputStream);
38
- private void readObject(java.io.ObjectInputStream);
39
- java.lang.Object writeReplace();
40
- java.lang.Object readResolve();
35
+
36
+ -keepattributes Signature,InnerClasses,EnclosingMethod,*Annotation*
37
+
38
+ # Retrofit
39
+ # This is to keep parameters on retrofit2.http-annotated methods while still allowing removal of unused ones
40
+ -keep,allowobfuscation @interface retrofit2.http.**
41
+ -keepclassmembers,allowshrinking,allowobfuscation interface * {
42
+ @retrofit2.http.** <methods>;
41
43
}
42
44
45
+ # Okio
46
+ -dontwarn okio.**
43
47
44
- # DataBinding
45
- -keep public class * extends androidx.databinding.ViewDataBinding {*;}
48
+ # Kotlin
49
+ -dontwarn kotlin.**
46
50
51
+ # Some unsafe classfactory stuff
52
+ -keep class sun.misc.Unsafe { *; }
53
+
54
+ # Ensure the custom, fast service loader implementation is removed. R8 will fold these for us
55
+ -assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
56
+ boolean FAST_SERVICE_LOADER_ENABLED return false;
57
+ }
58
+ -assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoader {
59
+ boolean ANDROID_DETECTED return true;
60
+ }
61
+ -checkdiscard class kotlinx.coroutines.internal.FastServiceLoader
47
62
48
- # WebView
49
- -keepclassmembers class * extends android.webkit.WebViewClient {*;}
50
- -keepclassmembers class * extends android.webkit.WebChromeClient.WebChromeClient {*;}
63
+ # Check that qualifier annotations have been discarded.
64
+ -checkdiscard @javax.inject.Qualifier class *
51
65
66
+ # Coroutines debug agent bits
67
+ -dontwarn java.lang.instrument.ClassFileTransformer
68
+ -dontwarn sun.misc.SignalHandler
69
+
70
+ # From OkHttp but gated appropriately
71
+ -dontwarn org.conscrypt.ConscryptHostnameVerifier
72
+
73
+ # ZoneRulesProvider _does_ exist!
74
+ -dontwarn java.time.zone.ZoneRulesProvider
52
75
53
76
# Arouter
54
77
-keep public class com.alibaba.android.arouter.routes.**{*;}
57
80
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
58
81
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
59
82
60
-
61
- # Glide
62
- -keep public class * implements com.bumptech.glide.module.GlideModule
63
- -keep class * extends com.bumptech.glide.module.AppGlideModule {
64
- <init>(...);
65
- }
66
- -keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
67
- **[] $VALUES;
68
- public *;
69
- }
70
- -keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
71
- *** rewind();
72
- }
73
-
74
-
75
- # Gson
76
- -dontwarn sun.misc.**
77
- -keep class com.google.gson.stream.** { *; }
78
- -keep class com.google.gson.examples.android.model.** { <fields>; }
79
- -keep class * extends com.google.gson.TypeAdapter
80
- -keep class * implements com.google.gson.TypeAdapterFactory
81
- -keep class * implements com.google.gson.JsonSerializer
82
- -keep class * implements com.google.gson.JsonDeserializer
83
- -keepclassmembers,allowobfuscation class * {
84
- @com.google.gson.annotations.SerializedName <fields>;
83
+ # DataBinding
84
+ -keep public class * extends androidx.databinding.ViewDataBinding {
85
+ * inflate(android.view.LayoutInflater);
85
86
}
86
-
87
-
88
- # Amap
89
- -keep class com.amap.api.maps.**{*;}
90
- -keep class com.autonavi.**{*;}
91
- -keep class com.amap.api.trace.**{*;}
92
- -keep class com.amap.api.location.**{*;}
93
- -keep class com.amap.api.fence.**{*;}
94
- -keep class com.autonavi.aps.amapapi.model.**{*;}
95
- -keep class com.amap.api.services.**{*;}
96
- -keep class com.amap.api.maps2d.**{*;}
97
- -keep class com.amap.api.mapcore2d.**{*;}
98
- -keep class com.amap.api.navi.**{*;}
99
- -keep class com.autonavi.**{*;}
0 commit comments