greenrobot/EventBus

Missing rule in consumer proguard rule file

tdtran opened this issue · 1 comments

The following should be added to the consumer proguard rule file

-keepclassmembers class org.greenrobot.eventbus.util.ThrowableFailureEvent {
    <init>(java.lang.Throwable);
}

The current rule set only have keepclassmembers for subclasses of ThrowableFailureEvent, not for ThrowableFailureEvent class itself

This problem is not exactly new. Before version 3.3.0 we were supposed to add the rules to our project proguard rule file ourself as advised by EventBus README which also forgot the rule for ThrowableFailureEvent class. One user reported the issue here

#131 (comment)

We had to do the same for our projects.

Thanks for reporting! The existing rule can also be replaced by yours as AsyncExecutor does not seem to require using a subclass of ThrowableFailureEvent. It's rather just the default.

Instead it requires any class with a constructor that takes a Throwable as single parameter. Should also update docs with this.