203 lines
5.1 KiB
Prolog
203 lines
5.1 KiB
Prolog
# Add project specific ProGuard rules here.
|
||
# You can control the set of applied configuration files using the
|
||
# proguardFiles setting in build.gradle.
|
||
#
|
||
# For more details, see
|
||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||
|
||
# If your project uses WebView with JS, uncomment the following
|
||
# and specify the fully qualified class name to the JavaScript interface
|
||
# class:
|
||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||
# public *;
|
||
#}
|
||
|
||
# Uncomment this to preserve the line number information for
|
||
# debugging stack traces.
|
||
#-keepattributes SourceFile,LineNumberTable
|
||
|
||
# If you keep the line number information, uncomment this to
|
||
# hide the original source file name.
|
||
#-renamesourcefileattribute SourceFile
|
||
|
||
# Add project specific ProGuard rules here.
|
||
# You can control the set of applied configuration files using the
|
||
# proguardFiles setting in build.gradle.kts.
|
||
#
|
||
# For more details, see
|
||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||
|
||
# If your project uses WebView with JS, uncomment the following
|
||
# and specify the fully qualified class name to the JavaScript interface
|
||
# class:
|
||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||
# public *;
|
||
#}
|
||
|
||
# Uncomment this to preserve the line number information for
|
||
# debugging stack traces.
|
||
#-keepattributes SourceFile,LineNumberTable
|
||
|
||
# If you keep the line number information, uncomment this to
|
||
# hide the original source file name.
|
||
#-renamesourcefileattribute SourceFile
|
||
|
||
|
||
#如果你使用全文检索插件,需要加入
|
||
-dontwarn org.apache.lucene.**
|
||
-keep class org.apache.lucene.** {*;}
|
||
|
||
|
||
|
||
-keep class com.fractalwrench.** { *; }
|
||
|
||
|
||
|
||
### glide 4
|
||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
||
**[] $VALUES;
|
||
public *;
|
||
}
|
||
|
||
-keep class com.alibaba.sdk.android.oss.** { *; }
|
||
-dontwarn okio.**
|
||
-dontwarn org.apache.commons.codec.binary.**
|
||
|
||
#okhttp
|
||
-dontwarn okhttp3.**
|
||
-keep class okhttp3.**{*;}
|
||
|
||
#如果你使用全文检索插件,需要加入
|
||
-dontwarn org.apache.lucene.**
|
||
-keep class org.apache.lucene.** {*;}
|
||
|
||
#如果你开启数据库功能,需要加入
|
||
-keep class net.sqlcipher.** {*;}
|
||
|
||
-keep class com.google.android.material.** {*;}
|
||
|
||
-keep class androidx.** {*;}
|
||
|
||
-keep public class * extends androidx.**
|
||
|
||
-keep interface androidx.** {*;}
|
||
|
||
-dontwarn com.google.android.material.**
|
||
|
||
-dontnote com.google.android.material.**
|
||
|
||
-dontwarn androidx.**
|
||
|
||
### APP 3rd party jars(xiaomi push)
|
||
-dontwarn com.xiaomi.push.**
|
||
-keep class com.xiaomi.** {*;}
|
||
|
||
### APP 3rd party jars(huawei push)
|
||
-ignorewarnings
|
||
-keepattributes *Annotation*
|
||
-keepattributes Exceptions
|
||
-keepattributes InnerClasses
|
||
-keepattributes Signature
|
||
-keepattributes SourceFile,LineNumberTable
|
||
# hmscore-support: remote transport
|
||
-keep class com.huawei.hianalytics.**{*;}
|
||
-keep class com.huawei.updatesdk.**{*;}
|
||
-keep class com.huawei.hms.**{*;}
|
||
|
||
### APP 3rd party jars(meizu push)
|
||
-dontwarn com.meizu.cloud.**
|
||
-keep class com.meizu.cloud.** {*;}
|
||
|
||
#vivo
|
||
-dontwarn com.vivo.push.**
|
||
-keep class com.vivo.push.** {*;}
|
||
-keep class com.vivo.vms.** {*;}
|
||
|
||
|
||
#oppo
|
||
-keep public class * extends android.app.Service
|
||
-keep class com.heytap.msp.** { *;}
|
||
|
||
|
||
### org.json xml
|
||
-dontwarn org.json.**
|
||
-keep class org.json.**{*;}
|
||
|
||
|
||
#okio
|
||
-dontwarn okio.**
|
||
-keep class okio.**{*;}
|
||
|
||
-keepclasseswithmembernames class * {
|
||
native <methods>;
|
||
}
|
||
|
||
-keepclasseswithmembers class * {
|
||
public <init>(android.content.Context, android.util.AttributeSet);
|
||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||
}
|
||
|
||
-keepclassmembers enum * {
|
||
public static **[] values();
|
||
public static ** valueOf(java.lang.String);
|
||
}
|
||
|
||
-keep class * implements android.os.Parcelable {
|
||
public static final android.os.Parcelable$Creator *;
|
||
}
|
||
|
||
-keepclassmembers class * implements java.io.Serializable {
|
||
static final long serialVersionUID;
|
||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||
private void writeObject(java.io.ObjectOutputStream);
|
||
private void readObject(java.io.ObjectInputStream);
|
||
java.lang.Object writeReplace();
|
||
java.lang.Object readResolve();
|
||
}
|
||
|
||
-keep class **.R$* {
|
||
*;
|
||
|
||
}
|
||
|
||
-dontwarn com.google.**
|
||
-keep class com.google.** {*;}
|
||
|
||
-keep public class * extends android.app.Service
|
||
-keep class com.heytap.msp.** { *;}
|
||
|
||
|
||
|
||
-dontwarn com.viontv.app.**
|
||
-keep class com.viontv.app.** {*;}
|
||
|
||
# RxJava2核心类保留
|
||
-keepclassmembers class rx.internal.util.unsafe.* {
|
||
*;
|
||
}
|
||
|
||
# 保留 RxJava2 所有 public 方法、字段、类(防止接口回调等失效)
|
||
-dontwarn io.reactivex.**
|
||
-keep class io.reactivex.** { *; }
|
||
-keep interface io.reactivex.** { *; }
|
||
|
||
# RxJava2 中的 lambda 保留(可选,如果你用 lambda 表达式)
|
||
-keepclassmembers class * {
|
||
@io.reactivex.annotations.NonNull <methods>;
|
||
}
|
||
|
||
# 避免 RxJava2 中使用的内部 Unsafe 类被混淆(在某些 Android 版本上避免崩溃)
|
||
-keepclassmembers class rx.internal.util.unsafe.* {
|
||
*;
|
||
}
|
||
|
||
# R8 针对 RxJava2 的优化处理(如果你使用的是 R8)
|
||
-dontwarn sun.misc.**
|
||
|
||
# 仅用于调试(可选)
|
||
-keepattributes *Annotation*
|
||
|
||
|