101 lines
2.6 KiB
Prolog
101 lines
2.6 KiB
Prolog
# 保留公共API不被混淆
|
||
-keep public class * extends android.app.Activity
|
||
-keep public class * extends android.app.Application
|
||
-keep public class * extends android.app.Service
|
||
-keep public class * extends android.content.BroadcastReceiver
|
||
-keep public class * extends android.content.ContentProvider
|
||
|
||
# 保留注解类
|
||
-keep class * extends java.lang.annotation.Annotation
|
||
|
||
# 保留接口实现
|
||
-keepclassmembers class * implements java.io.Serializable {
|
||
private static final long serialVersionUID;
|
||
}
|
||
|
||
# 保留R文件生成类
|
||
-keep class * extends android.view.View {
|
||
public <init>(android.content.Context, android.util.AttributeSet);
|
||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||
}
|
||
|
||
# 保留GreenDao
|
||
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
|
||
public static java.lang.String TABLENAME;
|
||
}
|
||
-keep class **$Properties { *; }
|
||
|
||
# If you DO use SQLCipher:
|
||
-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }
|
||
|
||
# If you do NOT use SQLCipher:
|
||
-dontwarn net.sqlcipher.database.**
|
||
# If you do NOT use RxJava:
|
||
-dontwarn rx.**
|
||
|
||
# 保留 Gson 序列化库
|
||
-keep class com.google.gson.** { *; }
|
||
-keep class * implements com.google.gson.TypeAdapter
|
||
-keep class * extends com.google.gson.reflect.TypeToken
|
||
|
||
# 保留 OkHttp 网络库
|
||
-keep class okhttp3.** { *; }
|
||
-keep interface okhttp3.** { *; }
|
||
-dontwarn okhttp3.**
|
||
|
||
# 保留 Glide 图片加载库
|
||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||
-keep class com.bumptech.glide.** { *; }
|
||
|
||
# 保留 Toaster 吐司框架
|
||
-keep class com.hjq.toast.** { *; }
|
||
-keep interface com.hjq.toast.** { *; }
|
||
|
||
# 保留 XXPermissions 权限请求库
|
||
-keep class com.hjq.permissions.** { *; }
|
||
|
||
# 保留 BaseRecyclerViewAdapterHelper
|
||
-keep class com.chad.library.adapter.** { *; }
|
||
|
||
# 保留 Glide 转换库
|
||
-keep class jp.wasabeef.glide.** { *; }
|
||
|
||
# 保留 ShapeBlurView 高斯模糊
|
||
-keep class com.centerzx.** { *; }
|
||
|
||
|
||
# 保留 友盟统计SDK
|
||
-keep class com.umeng.** { *; }
|
||
-dontwarn com.umeng.**
|
||
# 保留 RxJava/RxAndroid
|
||
-keep class rx.** { *; }
|
||
-dontwarn rx.**
|
||
|
||
# 保留 Kotlin标准库
|
||
-keep class kotlin.** { *; }
|
||
-keep class org.jetbrains.kotlin.** { *; }
|
||
|
||
# 保留 AndroidPicker选择器
|
||
-keep class com.github.gzuliyujiang.** { *; }
|
||
|
||
# 保留 SwipeRefreshLayout
|
||
-keep class androidx.swiperefreshlayout.** { *; }
|
||
|
||
# 保留 Core-KTX
|
||
-keep class androidx.core.** { *; }
|
||
|
||
# 所有实体类(JavaBean)需要保留:
|
||
-keep class com.yourpackage.model.** { *; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# 保留xpopup
|
||
-dontwarn com.lxj.xpopup.widget.**
|
||
-keep class com.lxj.xpopup.widget.**{*;} |