|
1 |
| -# Add project specific ProGuard rules here. |
2 |
| -# By default, the flags in this file are appended to flags specified |
3 |
| -# in d:\Android\sdk/tools/proguard/proguard-android.txt |
4 |
| -# You can edit the include path and order by changing the proguardFiles |
5 |
| -# directive in build.gradle. |
6 |
| -# |
7 |
| -# For more details, see |
8 |
| -# http://developer.android.com/guide/developing/tools/proguard.html |
9 |
| - |
10 |
| -# Add any project specific keep options here: |
11 |
| - |
12 |
| -# If your project uses WebView with JS, uncomment the following |
13 |
| -# and specify the fully qualified class name to the JavaScript interface |
14 |
| -# class: |
15 |
| -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { |
16 |
| -# public *; |
17 |
| -#} |
18 |
| - |
19 |
| -#指定代码的压缩级别 |
20 |
| --optimizationpasses 5 |
21 |
| -#包明不混合大小写 |
22 |
| --dontusemixedcaseclassnames |
23 |
| -#优化 不优化输入的类文件 |
24 |
| --dontoptimize |
25 |
| -#混淆时是否记录日志 |
26 |
| --verbose |
27 |
| -#混淆时所采用的算法 |
28 |
| --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* |
29 |
| -#保持哪些类不被混淆 |
30 |
| -#保护注解 |
31 | 1 | -keepattributes *Annotation*
|
32 |
| --keepattributes Signature |
33 |
| --keepattributes EnclosingMethod |
34 |
| -#崩溃信息 |
35 |
| --keepattributes SourceFile,LineNumberTable |
36 | 2 |
|
37 |
| -#basedata |
38 |
| --keepclasseswithmembers class * implements java.io.Serializable{ |
39 |
| - <fields>; |
40 |
| - <methods>; |
41 |
| -} |
42 |
| --keep class **.bean.**{*;} |
43 |
| -# 保留Parcelable序列化类不被混淆 |
44 |
| --keep class * implements android.os.Parcelable { |
45 |
| - public static final android.os.Parcelable$Creator *; |
46 |
| -} |
47 |
| --keepclassmembers enum * { |
48 |
| - public static **[] values(); |
49 |
| - public static ** valueOf(java.lang.String); |
50 |
| -} |
51 |
| --keepclasseswithmembers class * implements android.os.Parcelable{ |
| 3 | +-keepclasseswithmembers class * implements java.io.Serializable { |
52 | 4 | <fields>;
|
53 | 5 | <methods>;
|
54 | 6 | }
|
55 |
| --keep class * extends remix.myplayer.ui.adapter.holder.BaseViewHolder{*;} |
56 |
| --keep,allowshrinking,allowoptimization,allowobfuscation class remix.myplayer.ui.adapter.BaseAdapter |
57 |
| --keep,allowshrinking,allowoptimization,allowobfuscation class * extends remix.myplayer.ui.adapter.BaseAdapter |
58 | 7 |
|
59 |
| --keep class **.R$* {*;} |
60 |
| --keep public class remix.myplayer.R$*{ |
61 |
| -public static final int *; |
62 |
| -} |
| 8 | +-keep class remix.myplayer.bean.** { *; } |
63 | 9 | -keepclassmembers class ** {
|
64 | 10 | @remix.myplayer.misc.handler.OnHandleMessage public *;
|
65 | 11 | }
|
66 | 12 |
|
67 |
| --keep public class * extends android.app.Activity |
68 |
| --keep public class * extends android.app.Application |
69 |
| --keep public class * extends android.app.Service |
70 |
| --keep public class * extends android.content.BroadcastReceiver |
71 |
| --keep public class * extends android.content.ContentProvider |
72 |
| --keep public class * extends android.app.backup.BackupAgentHelper |
73 |
| --keep public class * extends android.preference.Preference |
74 |
| --keep public class com.android.vending.licensing.ILicensingService |
75 |
| --keep public class * extends java.lang.annotation.Annotation |
76 |
| --keep public class * extends android.os.Handler |
77 |
| --keep class !android.support.v7.internal.view.menu.**,android.support.** {*;} |
78 |
| - |
79 |
| --keep public class **.R$*{ |
80 |
| - public static final int *; |
81 |
| -} |
82 |
| - |
83 |
| -# Keep native methods |
84 |
| --keepclassmembers class * { |
85 |
| - native <methods>; |
86 |
| -} |
87 |
| - |
88 |
| --dontwarn okio.** |
89 |
| --dontwarn com.squareup.okhttp.** |
90 |
| --dontwarn okhttp3.** |
91 |
| --dontwarn javax.annotation.** |
92 |
| --dontwarn com.android.volley.toolbox.** |
93 |
| --dontwarn com.facebook.infer.** |
94 |
| - |
95 |
| - |
96 |
| -#retrofit2 |
97 |
| --dontwarn retrofit2.** |
98 |
| --keep class retrofit2.** { *; } |
99 |
| --if interface * { @retrofit2.http.* public *** *(...); } |
100 |
| --keep,allowoptimization,allowshrinking,allowobfuscation class <3> |
101 |
| - |
102 |
| --keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* { |
103 |
| - long producerIndex; |
104 |
| - long consumerIndex; |
105 |
| -} |
106 |
| --keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { |
107 |
| - rx.internal.util.atomic.LinkedQueueNode producerNode; |
108 |
| -} |
109 |
| --keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef { |
110 |
| - rx.internal.util.atomic.LinkedQueueNode consumerNode; |
111 |
| -} |
112 |
| - |
113 |
| -# FastScrollRecycleView |
114 |
| --keep class com.simplecityapps.recyclerview_fastscroll.** { *; } |
115 |
| - |
116 |
| -#rxpermission |
117 |
| --keep class com.tbruyelle.rxpermissions.**{*;} |
118 |
| - |
119 |
| -#lambda |
120 |
| --dontwarn java.lang.invoke.* |
121 |
| --dontwarn **$$Lambda$* |
122 |
| - |
123 |
| -# 如果你需要兼容6.0系统,请不要混淆org.apache.http.legacy.jar |
124 |
| --dontwarn android.net.compatibility.** |
125 |
| --dontwarn android.net.http.** |
126 |
| --dontwarn com.android.internal.http.multipart.** |
127 |
| --dontwarn org.apache.commons.** |
128 |
| --dontwarn org.apache.http.** |
129 |
| --keep class android.net.compatibility.**{*;} |
130 |
| --keep class android.net.http.**{*;} |
131 |
| --keep class com.android.internal.http.multipart.**{*;} |
132 |
| --keep class org.apache.commons.**{*;} |
133 |
| --keep class org.apache.http.**{*;} |
134 |
| - |
135 |
| -#kotlin |
136 |
| --dontwarn kotlin.** |
137 |
| - |
138 |
| -#bugly |
| 13 | +# bugly |
| 14 | +# https://bugly.qq.com/docs/user-guide/instruction-manual-android/ |
| 15 | +-keep public class com.tencent.bugly.** { *; } |
139 | 16 | -dontwarn com.tencent.bugly.**
|
140 |
| --keep public class com.tencent.bugly.**{*;} |
141 |
| - |
142 |
| -#coroutine |
143 |
| --keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {} |
144 |
| --keepnames class kotlinx.coroutines.CoroutineExceptionHandler {} |
145 |
| --keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {} |
146 |
| --keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {} |
147 |
| --keepclassmembernames class kotlinx.** { |
148 |
| - volatile <fields>; |
149 |
| -} |
150 |
| - |
151 |
| -# kotlinx |
152 |
| --dontwarn kotlinx.** |
153 |
| --keepnames class kotlinx.** { *; } |
154 |
| --keepclassmembernames class kotlinx.** { |
155 |
| - volatile <fields>; |
156 |
| -} |
157 | 17 |
|
158 |
| -# logback-android |
159 |
| --keep class ch.qos.** { *; } |
160 |
| --keep class org.slf4j.** { *; } |
161 |
| --keepattributes *Annotation* |
162 |
| --dontwarn ch.qos.logback.core.net.* |
| 18 | +# gson |
| 19 | +# https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md |
| 20 | +-keep class com.google.gson.reflect.TypeToken { *; } |
| 21 | +-keep class * extends com.google.gson.reflect.TypeToken |
163 | 22 |
|
164 |
| -#jaudiotagger |
| 23 | +# jaudiotagger |
| 24 | +# Simply keep all classes as they use reflection |
165 | 25 | -keep class org.jaudiotagger.** { *; }
|
166 | 26 | -dontwarn org.jaudiotagger.**
|
167 | 27 |
|
168 |
| -# Gson |
169 |
| --keep class com.google.gson.reflect.TypeToken { *; } |
170 |
| --keep class * extends com.google.gson.reflect.TypeToken |
| 28 | +# logback-android |
| 29 | +# https://github.com/tony19/logback-android/issues/229 |
| 30 | +# They've added consumer-rules.pro, but it seems to be unused |
| 31 | +-keepclassmembers class ch.qos.logback.classic.pattern.* { <init>(); } |
| 32 | +-keepclassmembers class ch.qos.logback.** { *; } |
| 33 | +-keepclassmembers class org.slf4j.impl.** { *; } |
| 34 | +-dontwarn ch.qos.logback.core.net.* |
| 35 | +# The classes used in app/src/main/assets/logback.xml |
| 36 | +# We need these rules to avoid ClassNotFoundException |
| 37 | +# Why this isn't mentioned in their document? |
| 38 | +-keep class ch.qos.logback.classic.android.LogcatAppender |
| 39 | +-keep class ch.qos.logback.core.rolling.RollingFileAppender |
| 40 | +-keep class ch.qos.logback.core.rolling.TimeBasedRollingPolicy |
0 commit comments