Skip to content

Commit d2db869

Browse files
committed
1:修改混淆配置文件;
1 parent d3ddb67 commit d2db869

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

module_app/proguard-rules.pro

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,29 @@
8181
public static final android.os.Parcelable$Creator *;
8282
}
8383

84+
8485
#不混淆Serializable接口的子类中指定的某些成员变量和方法
8586
-keepclassmembers class * implements java.io.Serializable {
8687
static final long serialVersionUID;
8788
private static final java.io.ObjectStreamField[] serialPersistentFields;
89+
!static !transient <fields>;
8890
private void writeObject(java.io.ObjectOutputStream);
8991
private void readObject(java.io.ObjectInputStream);
9092
java.lang.Object writeReplace();
9193
java.lang.Object readResolve();
9294
}
9395

94-
# 不混淆R类里及其所有内部static类中的所有static变量字段
95-
-keep public class com.guiying.androidmodulepattern.R$*{
96-
public static final int *;
97-
}
98-
9996

10097
-keepclassmembers class * {
10198
public <init> (org.json.JSONObject);
10299
}
103100

101+
102+
# 不混淆R类里及其所有内部static类中的所有static变量字段,$是用来分割内嵌类与其母体的标志
103+
-keep public class **.R$*{
104+
public static final int *;
105+
}
106+
104107
#---------------------------------webview------------------------------------
105108
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
106109
public *;
@@ -116,6 +119,7 @@
116119
-keep class com.guiying.girls.data.bean.** {*;}
117120

118121
#---------------------------------第三方库及jar包-------------------------------
122+
119123
#litepal数据库不能被混淆
120124
-keep class org.litepal.** {*;}
121125
-keep class * extends org.litepal.crud.DataSupport {*;}
@@ -128,18 +132,42 @@
128132
}
129133

130134

135+
#PersistentCookieJar
136+
-dontwarn com.franmontiel.persistentcookiejar.**
137+
-keep class com.franmontiel.persistentcookiejar.**
138+
139+
131140
#activityrouter
132141
-keep class com.github.mzule.activityrouter.router.** { *; }
133142

134143
#友盟统计
135144
-keep class com.umeng.analytics.** {*;}
136145
-dontwarn com.umeng.analytics.**
146+
#友盟推送
147+
-dontwarn com.taobao.**
148+
-dontwarn anet.channel.**
149+
-dontwarn anetwork.channel.**
150+
-dontwarn org.android.**
151+
-dontwarn org.apache.thrift.**
152+
-dontwarn com.xiaomi.**
153+
-dontwarn com.huawei.**
154+
-keep class com.taobao.** {*;}
155+
-keep class org.android.** {*;}
156+
-keep class anet.channel.** {*;}
157+
-keep class com.umeng.** {*;}
158+
-keep class com.xiaomi.** {*;}
159+
-keep class com.huawei.** {*;}
160+
-keep class org.apache.thrift.** {*;}
161+
-keep class com.alibaba.sdk.android.**{*;}
162+
-keep class com.ut.**{*;}
163+
-keep class com.ta.**{*;}
137164

138165

139166
#换肤框架的混淆文件
140167
-keep class solid.ren.skinlibrary.** {*;}
141168
-dontwarn solid.ren.skinlibrary.**
142169

170+
143171
#高德相关混淆文件
144172
#3D 地图
145173
-keep class com.amap.api.** {*;}
@@ -233,8 +261,6 @@
233261
#retrofit
234262
-dontwarn retrofit.**
235263
-keep class retrofit.** { *; }
236-
-keepattributes Signature
237-
-keepattributes Exceptions
238264
-dontwarn okio.**
239265

240266

0 commit comments

Comments
 (0)