android EventBus 3.0 混淆配置

来源:互联网 发布:牵犬东门岂可得乎 编辑:程序博客网 时间:2024/06/03 18:11

https://github.com/greenrobot/EventBus  

使用的这个库在github的官网README中没有写明相应混淆的配置.

经过对官网的查询,在一个小角落还是被我找到了。

-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);
}

链接:http://greenrobot.org/eventbus/documentation/proguard/

5 0
原创粉丝点击