android EventBus 3 混淆配置

使用EventBus 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);
}

由于访问官网是需要翻墙,因此做下记录
http://greenrobot.org/eventbus/documentation/proguard/

你可能感兴趣的:(android EventBus 3 混淆配置)