123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- # 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);
- }
- -keepattributes *JavascriptInterface*
- -keep class android.webkit.JavascriptInterface {*;}
- -keepclassmembers class * extends android.webkit.webViewClient {
- public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
- public boolean *(android.webkit.WebView, java.lang.String);
- }
- -keepclassmembers class * extends android.webkit.webViewClient {
- public void *(android.webkit.webView, jav.lang.String);
- }
- -keep class com.hc.webapp.web.AndroidToJS {*;}
- -keep class com.hc.webapp.web.HCWebChromeClient {*;}
- -keep class com.hc.webapp.web.HCWebViewClient {*;}
- # 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.**
|