# 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
|
|
# 指定代码的压缩级别
|
-optimizationpasses 5
|
# 是否使用大小写混合
|
-dontusemixedcaseclassnames
|
# 是否混淆第三方jar
|
-dontskipnonpubliclibraryclasses
|
# 混淆时是否做预校验
|
-dontpreverify
|
# 混淆时是否记录日志
|
-verbose
|
# 混淆时所采用的算法
|
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
-ignorewarnings
|
#-ignorewarnings
|
-keepattributes *Annotation*
|
-keepattributes Signature
|
-keepattributes SourceFile,LineNumberTable
|
-keepattributes Exceptions,InnerClasses,Deprecated,LocalVariable*Table,Synthetic,EnclosingMethod
|
-keepattributes EnclosingMethod
|
|
# Keep native methods
|
-keepclassmembers class * {
|
native <methods>;
|
}
|
|
-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 public class * implements java.io.Serializable {
|
public *;
|
}
|
|
-keep class **.R$*{
|
*;
|
}
|
|
-keepclassmembers class * {
|
public <init>(org.json.JSONObject);
|
}
|
|
-keepclasseswithmembernames class * {
|
native <methods>;
|
}
|
|
-keepclassmembers enum * {
|
public static **[] values();
|
public static ** valueOf(java.lang.String);
|
}
|
|
|
# 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆
|
-keepclassmembers class * {
|
void *(**On*Event);
|
void *(**On*Listener);
|
}
|
|
# OKHttp
|
-dontwarn okhttp3.internal.platform.**
|
-dontwarn org.conscrypt.**
|
-dontwarn org.bouncycastle.**
|
-dontwarn org.openjsse.**
|
|
|
# ButterKnife
|
-keep class butterknife.** { *; }
|
-dontwarn butterknife.internal.**
|
-keep class **$$ViewBinder { *; }
|
-keepclasseswithmembernames class * {
|
@butterknife.* <fields>;
|
}
|
-keepclasseswithmembernames class * {
|
@butterknife.* <methods>;
|
}
|
|
# Glide
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
**[] $VALUES;
|
public *;
|
}
|
|
|
|
|
|
|
|
|
# 保留我们自定义控件(继承自View)不被混淆
|
-keep public class * extends android.view.View{
|
*** get*();
|
void set*(***);
|
public <init>(android.content.Context);
|
public <init>(android.content.Context, android.util.AttributeSet);
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
}
|
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
|
-dontwarn com.shuyu.gsyvideoplayer.video.**
|
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
|
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
|
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
|
-dontwarn com.shuyu.gsyvideoplayer.utils.**
|
-keep class tv.danmaku.ijk.** { *; }
|
-dontwarn tv.danmaku.ijk.**
|
|
-keep class androidx.media3.** {*;}
|
-keep interface androidx.media3.**
|
|
-keep class com.google.android.exoplayer2.** {*;}
|
-keep interface com.google.android.exoplayer2.**
|
|
-keep class com.shuyu.alipay.** {*;}
|
-keep interface com.shuyu.alipay.**
|
|
-keep class com.alivc.**{*;}
|
-keep class com.aliyun.**{*;}
|
-keep class com.cicada.**{*;}
|
-dontwarn com.alivc.**
|
-dontwarn com.aliyun.**
|
-dontwarn com.cicada.**
|