studio中常用框架以及常用第三方混淆配置

写这篇总结是为了方面大家在studio中的混淆配置
1个推
-dontwarn com.igexin.**
-keep class com.igexin.{;}
-keep class org.json.
* { *; }

2支付宝

-libraryjars libs/alipaySdk-20160516.jar

-keep class com.alipay.android.app.IAlixPay{;}
-keep class com.alipay.android.app.IAlixPay$Stub{
;}
-keep class com.alipay.android.app.IRemoteServiceCallback{;}
-keep class com.alipay.android.app.IRemoteServiceCallback$Stub{
;}
-keep class com.alipay.sdk.app.PayTask{ public ;}
-keep class com.alipay.sdk.app.AuthTask{ public ;}
-dontwarn android.net.

-keep class android.net.SSLCertificateSocketFactory{*;}

3.EventBus
-keepattributes Annotation
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe ;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }

Only required if you use AsyncExecutor

-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
(Java.lang.Throwable);
}

4 xutils 配置
-keepattributes Signature,Annotation
-keep public class org.xutils.** {
public protected ;
}
-keep public interface org.xutils.
* {
public protected ;
}
-keepclassmembers class * extends org.xutils.
* {
public protected ;
}
-keepclassmembers @org.xutils.db.annotation.
class * {;}
-keepclassmembers @org.xutils.http.annotation.
class * {*;}
-keepclassmembers class * {
@org.xutils.view.annotation.Event ;
}

5 glide 配置
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;

}
-dontwarn javax.annotation.**
-dontwarn javax.inject.**

6 OkHttp3
-dontwarn okhttp3.logging.**
-keep class okhttp3.internal.{;}
-dontwarn okio.
*

7 Retrofit2
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

8 RxJava RxAndroid
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.ArrayQueueField* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}

9 Gson
-keep class com.google.gson.stream.** { *; }
-keepattributes EnclosingMethod

10mapAndoridchart
-keep class com.github.mikephil.charting.** { ; }
-dontwarn io.realm.
*

11databinding
-dontwarn android.databinding.**
-keep class android.databinding.** { *; }

12sugar(一个辅助操作数据库的)
-keep class com.yourpackage.yourapp.domainclasspackage.** { *; }

13sharesdk
-keep class cn.sharesdk.{;}
-keep class com.sina.
{;}
-keep class .R$ {;}
-keep class .R{;}
-keep class com.mob.
{;}
-dontwarn com.mob.**
-dontwarn cn.sharesdk.**
-dontwarn *.R$

你可能感兴趣的:(studio中常用框架以及常用第三方混淆配置)