-optimizationpasses 5 #混淆压缩比率
-dontusemixedcaseclassnames # 是否使用大小写混合
-verbose # 混淆时是否记录日志
-dontpreverify # 混淆时是否做预校验
-optimizations !code/simplification/arithmetic,!field/,!class/merging/ #混淆算法
# ————-系统类不需要混淆 ————————–
-keep public class * extends android.app.Fragment
-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 public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.**
-keep public class com.android.vending.licensing.ILicensingService
-keepclassmembers class com.app.huibo.utils.WebViewHtmlShareUtils{
public *;
}
-keepattributes JavascriptInterface
-keepclasseswithmembernames class * { # 保持 native 方法不被混淆
native ;
}
-keepclasseswithmembernames class * { # 保持自定义控件类不被混淆
public (android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * { # 保持自定义控件类不被混淆
public (android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
public static final android.os.Parcelable$Creator *;
}
-keep class com.app.huibo.service.MiPushMessageReceiver{*;}
-keep class com.app.huibo.utils.PhotoSelectAndUploadUtils{*;}
-keep class com.example.librarydemo.GetPhotoAlbumPath{*;}
#—————–如果引用了v4或者v7包———–
-dontwarn android.support.**
-dontwarn android.support.v4.**
-keep class android.support.v4.* { ; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
# ——— 忽略异常提示 ——————–
-dontwarn com.alipay.**
-dontwarn com.mikepenz.**
-dontwarn org.apache.**
-dontwarn com.amap.**
-dontwarn com.android.volley.**
-dontwarn com.rey.**
-dontwarn com.testin.**
-dontwarn jp.wasabeef.**
-dontwarn android.support.**
-dontwarn android.support.v4.**
#———zxing———-
#-keep class com.uuzuche.lib_zxing.* {;}
#———-融云混淆相关———————
-keepclassmembers class fqcn.of.javascript.interface.for.webview { public *;
}
-keepattributes Exceptions,InnerClasses
-keep class io.rong.* {;}
-keep class * implements io.rong.imlib.model.MessageContent{*;}
-keepattributes Signature
-keepattributes Annotation
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.* { ; }
-keepclassmembers class * extends com.sea_monster.dao.AbstractDao { public static java.lang.String TABLENAME;
}
-keep class **$Properties
-keep class com.ultrapower.* {;}
-dontwarn org.eclipse.jdt.annotation.**
-dontwarn io.rong.push.**
-dontnote com.xiaomi.**
-dontnote com.huawei.android.pushagent.**
-dontnote com.google.android.gms.gcm.**
-dontnote io.rong.**
-ignorewarnings
#——————-腾讯IM—————
-keep class com.tencent.*{;}
-dontwarn com.tencent.**
-keep class tencent.*{;}
-dontwarn tencent.**
-keep class qalsdk.*{;}
-dontwarn qalsdk.**
#——————-支付宝—————
-keep class com.alipay.android.app.IAlixPay{*;}
-keep class com.alipay.android.app.IAlixPay Stub∗;−keepclasscom.alipay.android.app.IRemoteServiceCallback∗;−keepclasscom.alipay.android.app.IRemoteServiceCallback S t u b ∗ ; − k e e p c l a s s c o m . a l i p a y . a n d r o i d . a p p . I R e m o t e S e r v i c e C a l l b a c k ∗ ; − k e e p c l a s s c o m . a l i p a y . a n d r o i d . a p p . I R e m o t e S e r v i c e C a l l b a c k Stub{*;}
-keep class com.alipay.sdk.app.PayTask{ public *;}
-keep class com.alipay.sdk.app.AuthTask{ public *;}
#—————微信支付相关—————
-keep class com.tencent.mm.opensdk.**{
*;
}
-keep class org.apache.http.*{;}
#如果使用了gson
#-dontwarn com.google.gson.**
#-keep class com.google.gson.*{;}
#-keep class sun.misc.Unsafe {*;}
#百度地图
-dontwarn com.baidu.**
-keep class com.baidu.*{;}
-keep class vi.com.* {;}
#-optimizationpasses 7
#-optimizations !code/simplification/arithmetic,!field/,!class/merging/
-dontoptimize
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontwarn dalvik.**
#-overloadaggressively
#@proguard_debug_start
# —————— Keep LineNumbers and properties —————- #
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,Annotation,EnclosingMethod
-renamesourcefileattribute TbsSdkJava
-keepattributes SourceFile,LineNumberTable
# ————————————————————————–
# Addidional for x5.sdk classes for apps
-keep class com.tencent.smtt.export.external.**{
*;
}
-keep class com.tencent.tbs.video.interfaces.IUserStateChangedListener {
*;
}
-keep class com.tencent.smtt.sdk.CacheManager {
public *;
}
-keep class com.tencent.smtt.sdk.CookieManager {
public *;
}
-keep class com.tencent.smtt.sdk.WebHistoryItem {
public *;
}
-keep class com.tencent.smtt.sdk.WebViewDatabase {
public *;
}
-keep class com.tencent.smtt.sdk.WebBackForwardList {
public *;
}
-keep public class com.tencent.smtt.sdk.WebView {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebView$HitTestResult {
public static final ;
public java.lang.String getExtra();
public int getType();
}
-keep public class com.tencent.smtt.sdk.WebView$WebViewTransport {
public ;
}
-keep public class com.tencent.smtt.sdk.WebView$PictureListener {
public ;
public ;
}
-keepattributes InnerClasses
-keep public enum com.tencent.smtt.sdk.WebSettings$** {
*;
}
-keep public class com.tencent.smtt.sdk.WebSettings {
public *;
}
-keepattributes Signature
-keep public class com.tencent.smtt.sdk.ValueCallback {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebViewClient {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.DownloadListener {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebChromeClient {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebChromeClient$FileChooserParams {
public ;
public ;
}
-keep class com.tencent.smtt.sdk.SystemWebChromeClient{
public *;
}
# 1. extension interfaces should be apparent
-keep public class com.tencent.smtt.export.external.extension.interfaces.* {
public protected *;
}
# 2. interfaces should be apparent
-keep public class com.tencent.smtt.export.external.interfaces.* {
public protected *;
}
-keep public class com.tencent.smtt.sdk.WebViewCallbackClient {
public protected *;
}
-keep public class com.tencent.smtt.sdk.WebStorage$QuotaUpdater {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebIconDatabase {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.WebStorage {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.DownloadListener {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.QbSdk {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.QbSdk$PreInitCallback {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.CookieSyncManager {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.Tbs* {
public ;
public ;
}
-keep public class com.tencent.smtt.utils.LogFileUtils {
public ;
public ;
}
-keep public class com.tencent.smtt.utils.TbsLog {
public ;
public ;
}
-keep public class com.tencent.smtt.utils.TbsLogClient {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.CookieSyncManager {
public ;
public ;
}
# Added for game demos
-keep public class com.tencent.smtt.sdk.TBSGamePlayer {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerClient* {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerClientExtension {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerService* {
public ;
public ;
}
-keep public class com.tencent.smtt.utils.Apn {
public ;
public ;
}
# end
-keep public class com.tencent.smtt.export.external.extension.proxy.ProxyWebViewClientExtension {
public ;
public ;
}
-keep class MTT.ThirdAppInfoNew {
*;
}
-keep class com.tencent.mtt.MttTraceEvent {
*;
}
# Game related
-keep public class com.tencent.smtt.gamesdk.* {
public protected *;
}
-keep public class com.tencent.smtt.sdk.TBSGameBooter {
public ;
public ;
}
-keep public class com.tencent.smtt.sdk.TBSGameBaseActivity {
public protected *;
}
-keep public class com.tencent.smtt.sdk.TBSGameBaseActivityProxy {
public protected *;
}
-keep public class com.tencent.smtt.gamesdk.internal.TBSGameServiceClient {
public *;
}
#—————— 下方是共性的排除项目 —————-
# 方法名中含有“JNI”字符的,认定是Java Native Interface方法,自动排除
# 方法名中含有“JRI”字符的,认定是Java Reflection Interface方法,自动排除
-keepclasseswithmembers class * {
… JNI(…);
}
-keepclasseswithmembernames class * {
… JRI(…);
}
-keep class *JNI {*;}
#七牛云播放sdk混淆
-keep class com.pili.pldroid.player.* { ; }
-keep class tv.danmaku.ijk.media.player.* {;}
#ShareSdk分享混淆
-keep class cn.sharesdk.*{;}
-keep class com.sina.*{;}
-keep class *.R$ {*;}
-keep class *.R{;}
-dontwarn cn.sharesdk.**
-dontwarn *.R$
-keep class m.framework.*{;}
-keep class android.net.http.SslError
-keep class android.webkit.*{;}
-keep class com.mob.tools.utils
-keep class com.xiaomi.*{;}