| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- # Add project specific ProGuard rules here.
- # By default, the flags in this file are appended to flags specified
- # in D:\work\software\SDK/tools/proguard/proguard-android.txt
- # You can edit the include path and order by changing the proguardFiles
- # directive in build.gradle.
- #
- # For more details, see
- # http://developer.android.com/guide/developing/tools/proguard.html
- # Add any project specific keep options here:
- # 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
- -dontshrink
- -dontwarn com.google.android.maps.**
- -dontwarn android.webkit.WebView
- -dontwarn okhttp3.**
- -dontwarn okio.**
- -dontwarn javax.annotation.**
- # A resource is loaded with a relative path so the package of this class must be preserved.
- -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
- -keep class com.tencent.mm.opensdk.** { *;}
- -keep class com.tencent.wxop.** { *;}
- -keep class com.tencent.mm.sdk.** { *;}
- -dontwarn com.tencent.bugly.**
- -keep public class com.tencent.**{*;}
- -keep class android.support.**{*;}
- #友盟
- -keep class com.umeng.** {*;}
- -keep public interface com.umeng.**
- -keep public interface com.tencent.**
- -keep public class com.umeng.* {*;}
- -keep class UMMoreHandler{*;}
- -keep class com.tencent.mm.sdk.modelmsg.WXMediaMessage {*;}
- -keep class com.tencent.mm.sdk.modelmsg.** implements com.tencent.mm.sdk.modelmsg.WXMediaMessage$IMediaObject {*;}
- -keep class com.tencent.mm.** {
- *;
- }
- -keep class com.tencent.tinker.** { *; }
- #
-keep class android.support.**{*;}
- -dontwarn twitter4j.**
- -keep class twitter4j.** { *; }
- -keep class com.tencent.** {*;}
- -dontwarn com.tencent.**
- -keep class com.kakao.** {*;}
- -dontwarn com.kakao.**
- -keep public class com.umeng.com.umeng.soexample.R$*{
- public static final int *;
- }
- -keep public class com.linkedin.android.mobilesdk.R$*{
- public static final int *;
- }
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
- -keep class com.tencent.open.TDialog$*
- -keep class com.tencent.open.TDialog$* {*;}
- -keep class com.tencent.open.PKDialog
- -keep class com.tencent.open.PKDialog {*;}
- -keep class com.tencent.open.PKDialog$*
- -keep class com.tencent.open.PKDialog$* {*;}
- -keep class com.umeng.socialize.impl.ImageImpl {*;}
- -keep class com.sina.** {*;}
- -dontwarn com.sina.**
- -keep class com.alipay.share.sdk.** {
- *;
- }
- -keepnames class * implements android.os.Parcelable {
- public static final ** CREATOR;
- }
- -keep class com.linkedin.** { *; }
- -keep class com.android.dingtalk.share.ddsharemodule.** { *; }
- #指定代码的压缩级别
- -optimizationpasses 5
- #不去忽略非公共的库类
- -dontskipnonpubliclibraryclasses
- -dontskipnonpubliclibraryclassmembers
- # 是否使用大小写混合
- -dontusemixedcaseclassnames
- #预校验
- -dontpreverify
- #混淆时是否记录日志
- -verbose
- #忽略警告,避免打包时某些警告出现
- -ignorewarning
- # 混淆时所采用的算法
- -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
- #保护注解
- -keepattributes *Annotation*
- #记录生成的日志数据,gradle build时在本项目根目录输出
- #apk 包内所有 class 的内部结构
- -dump class_files.txt
- #未混淆的类和成员
- -printseeds seeds.txt
- #列出从 apk 中删除的代码
- -printusage unused.txt
- #混淆前后的映射
- -printmapping mapping.txt
- # 保持哪些类不被混淆
- -keep public class * extends android.app.Activity
- -keep public class * extends android.app.Fragment
- -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 com.android.vending.licensing.ILicensingService
- -keep class * implements java.io.Serializable
- -keepattributes *Annotation*
- -keepclassmembers class ** {
- @org.greenrobot.eventbus.Subscribe <methods>;
- }
- -keep enum org.greenrobot.eventbus.ThreadMode { *; }
- # Only required if you use AsyncExecutor
- -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
- <init>(java.lang.Throwable);
- }
- #app
- #忽略bean类
- -keep class com.googlecode.protobuf.format.** { *; }
- -keep class com.kfzs.duanduan.bean.** { *; }
- -keep class com.kfzs.duanduan.proto.** { *; }
- -keep class com.sheep.gamegroup.model.** { *; }
- -keep class com.sheep.jiuyan.samllsheep.service.DownloadService { *; }
- #datashare
- -keep class com.kfzs.duanduan.data.graph.** { *; }
- -keep class com.kfzs.duanduan.datashare.** { *; }
- #ari
- #-keep class com.arialyy.** { *; }
- -dontwarn com.arialyy.aria.**
- -keep class com.arialyy.aria.**{*;}
- -keep class **$$DownloadListenerProxy{ *; }
- -keep class **$$UploadListenerProxy{ *; }
- -keep class **$$DownloadGroupListenerProxy{ *; }
- -keepclasseswithmembernames class * {
- @Download.* <methods>;
- @Upload.* <methods>;
- @DownloadGroup.* <methods>;
- }
- -keep class org.** { *; }
- -keep class sun.** { *; }
- -keep class net.** { *; }
- -keep class com.fasterxml.** { *; }
- -keep class javax.** { *; }
- -keep class rx.** { *; }
- # Retrofit 2.X
- ## https://square.github.io/retrofit/ ##
- -dontwarn retrofit2.**
- -keep class retrofit2.** { *; }
- -keepattributes Signature
- -keepattributes Exceptions
- -keepclasseswithmembers class * {
- @retrofit2.http.* <methods>;
- }
- # Retrofit 1.X
- -keep class com.squareup.okhttp.** { *; }
- -keep class retrofit.** { *; }
- -keep interface com.squareup.okhttp.** { *; }
- -dontwarn com.squareup.okhttp.**
- -dontwarn okio.**
- -dontwarn retrofit.**
- -dontwarn rx.**
- -keepclasseswithmembers class * {
- @retrofit.http.* <methods>;
- }
- # If in your rest service interface you use methods with Callback argument.
- -keepattributes Exceptions
- # If your rest service methods throw custom exceptions, because you've defined an ErrorHandler.
- -keepattributes Signature
- # Also you must note that if you are using GSON for conversion from JSON to POJO representation, you must ignore those POJO classes from being obfuscated.
- # Here include the POJO's that have you have created for mapping JSON response to POJO for example.
- ## Square Otto specific rules ##
- ## https://square.github.io/otto/ ##
- -keepattributes *Annotation*
- -keepclassmembers class ** {
- @com.squareup.otto.Subscribe public *;
- @com.squareup.otto.Produce public *;
- }
- ## Square Picasso specific rules ##
- ## https://square.github.io/picasso/ ##
- -dontwarn com.squareup.okhttp.**
- # OkHttp
- -keepattributes Signature
- -keepattributes *Annotation*
- -keep class okhttp3.** { *; }
- -keep interface okhttp3.** { *; }
- -dontwarn okhttp3.**
- # Dagger ProGuard rules.
- # https://github.com/square/dagger
- -dontwarn dagger.internal.codegen.**
- -keepclassmembers,allowobfuscation class * {
- @javax.inject.* *;
- @dagger.* *;
- <init>();
- }
- -keep class dagger.* { *; }
- -keep class javax.inject.* { *; }
- -keep class * extends dagger.internal.Binding
- -keep class * extends dagger.internal.ModuleAdapter
- -keep class * extends dagger.internal.StaticInjection
- # RxJava 0.21
- -keep class rx.schedulers.Schedulers {
- public static <methods>;
- }
- -keep class rx.schedulers.ImmediateScheduler {
- public <methods>;
- }
- -keep class rx.schedulers.TestScheduler {
- public <methods>;
- }
- -keep class rx.schedulers.Schedulers {
- public static ** test();
- }
- # Configuration for Guava 18.0
- #
- # disagrees with instructions provided by Guava project: https://code.google.com/p/guava-libraries/wiki/UsingProGuardWithGuava
- -keep class com.google.common.io.Resources {
- public static <methods>;
- }
- -keep class com.google.common.collect.Lists {
- public static ** reverse(**);
- }
- -keep class com.google.common.base.Charsets {
- public static <fields>;
- }
- -keep class com.google.common.base.Joiner {
- public static com.google.common.base.Joiner on(java.lang.String);
- public ** join(...);
- }
- -keep class com.google.common.collect.MapMakerInternalMap$ReferenceEntry
- -keep class com.google.common.cache.LocalCache$ReferenceEntry
- # http://stackoverflow.com/questions/9120338/proguard-configuration-for-guava-with-obfuscation-and-optimization
- -dontwarn javax.annotation.**
- -dontwarn javax.inject.**
- -dontwarn sun.misc.Unsafe
- # Guava 19.0
- -dontwarn java.lang.ClassValue
- -dontwarn com.google.j2objc.annotations.Weak
- -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
- ## GSON 2.2.4 specific rules ##
- # Gson uses generic type information stored in a class file when working with fields. Proguard
- # removes such information by default, so configure it to keep all of it.
- -keepattributes Signature
- # For using GSON @Expose annotation
- -keepattributes *Annotation*
- -keepattributes EnclosingMethod
- # Gson specific classes
- -keep class sun.misc.Unsafe { *; }
- -keep class com.google.gson.stream.** { *; }
- # GreenDao rules
- # Source: http://greendao-orm.com/documentation/technical-faq
- #
- -keepclassmembers class * extends de.greenrobot.dao.AbstractDao {
- public static java.lang.String TABLENAME;
- }
- -keep class **$Properties
- # Glide specific rules #
- # https://github.com/bumptech/glide
- -keep public class * implements com.bumptech.glide.module.GlideModule
- -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
- **[] $VALUES;
- public *;
- }
- # Fresco v0.8.1 ProGuard rules.
- # https://github.com/facebook/fresco
- -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
- # Do not strip any method/class that is annotated with @DoNotStrip
- -keep @com.facebook.common.internal.DoNotStrip class *
- -keepclassmembers class * {
- @com.facebook.common.internal.DoNotStrip *;
- }
- # Keep native methods
- -keepclassmembers class * {
- native <methods>;
- }
- -dontwarn okio.**
- -dontwarn javax.annotation.**
- -dontwarn com.android.volley.toolbox.**
- ## New rules for EventBus 3.0.x ##
- # http://greenrobot.org/eventbus/documentation/proguard/
- -keepattributes *Annotation*
- -keepclassmembers class ** {
- @org.greenrobot.eventbus.Subscribe <methods>;
- }
- -keep enum org.greenrobot.eventbus.ThreadMode { *; }
- # Only required if you use AsyncExecutor
- -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
- <init>(java.lang.Throwable);
- }
- #Easy-Adapter v1.5.0
- -keepattributes *Annotation*
- -keepclassmembers class * extends uk.co.ribot.easyadapter.ItemViewHolder {
- public <init>(...);
- }
- # Crashlytics 2.+
- -keep class com.crashlytics.** { *; }
- -keep class com.crashlytics.android.**
- -keepattributes SourceFile, LineNumberTable, *Annotation*
- # If you are using custom exceptions, add this line so that custom exception types are skipped during obfuscation:
- -keep public class * extends java.lang.Exception
- # For Fabric to properly de-
- # ButterKnife 7
- -keep class butterknife.** { *; }
- -dontwarn butterknife.internal.**
- -keep class **$$ViewBinder { *; }
- -keepclasseswithmembernames class * {
- @butterknife.* <fields>;
- }
- -keepclasseswithmembernames class * {
- @butterknife.* <methods>;
- }
- # fastjson proguard rules
- # https://github.com/alibaba/fastjson
- -dontwarn com.alibaba.fastjson.**
- -keepattributes Signature
- -keepattributes *Annotation*
- ## ActionBarSherlock 4.4.0 specific rules ##
- -keep class android.support.v4.app.** { *; }
- -keep interface android.support.v4.app.** { *; }
- -keep class com.actionbarsherlock.** { *; }
- -keep interface com.actionbarsherlock.** { *; }
- -keepattributes *Annotation*
- ## hack for Actionbarsherlock 4.4.0, see https://github.com/JakeWharton/ActionBarSherlock/issues/1001 ##
- -dontwarn com.actionbarsherlock.internal.**
- ## SVG Android ##
- #https://github.com/pents90/svg-android
- -keep class com.larvalabs.svgandroid.** {*;}
- -keep class com.larvalabs.svgandroid.*$* {*;}
- -keep public class android.support.v7.widget.** { *; }
- -keep public class android.support.v7.internal.widget.** { *; }
- -keep public class android.support.v7.internal.view.menu.** { *; }
- -keep public class * extends android.support.v4.view.ActionProvider {
- public <init>(android.content.Context);
- }
- -dontwarn android.support.design.**
- -keep class android.support.design.** { *; }
- -keep interface android.support.design.** { *; }
- -keep public class android.support.design.R$* { *; }
- ##极光推送
- -dontoptimize
- -dontpreverify
- -dontwarn cn.jpush.**
- -keep class cn.jpush.** { *; }
- -keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
- -dontwarn cn.jiguang.**
- -keep class cn.jiguang.** { *; }
- #2.0.5 ~ 2.1.7 版本有引入 gson 和 protobuf ,增加排除混淆的配置。(2.1.8版本不需配置)
- #==================gson && protobuf==========================
- -dontwarn com.google.**
- -keep class com.google.gson.** {*;}
- -keep class com.google.protobuf.** {*;}
- # banner 的混淆代码
- -keep class com.youth.banner.** {
- *;
- }
|