AndroidEventBus icon indicating copy to clipboard operation
AndroidEventBus copied to clipboard

Proguard Instructions

Open creativedrewy opened this issue 10 years ago • 6 comments

Hey, I just thought I would let you know. If you're using Proguard with this library methods with the @Subscriber annotation may get compiled out of your app. So none of the event handling works - the methods aren't even there to respond. Here is what I added to the proguard rules file:

-keep class org.simple.** { *; }
-keep interface org.simple.** { *; }
-keepclassmembers class * {
    @org.simple.eventbus.Subscriber <methods>;
}

This keeps any methods that have the Subscriber annotation and the event handling works. I thought you might want to add this to your readme for others who would use the library.

creativedrewy avatar May 04 '15 18:05 creativedrewy

@creativedrewy Thanks a million. It's helpful, and what's your app name ? Can i put your app in readme ? I collect the app which use AndroidEventBus,and make people know this is a reliable library.Thanks again.

hehonghui avatar May 05 '15 03:05 hehonghui

@bboyfeiyu The app isn't deployed yet. I will make sure that my company is okay with it being in the readme; I don't see why not. I will let you know when it's out there!

creativedrewy avatar May 05 '15 20:05 creativedrewy

Thanks, andrew, I will be looking forward to your reply .

2015-05-06 4:15 GMT+08:00 Andrew [email protected]:

@bboyfeiyu https://github.com/bboyfeiyu The app isn't deployed yet. I will make sure that my company is okay with it being in the readme; I don't see why not. I will let you know when it's out there!

— Reply to this email directly or view it on GitHub https://github.com/bboyfeiyu/AndroidEventBus/issues/12#issuecomment-99208580 .

hehonghui avatar May 06 '15 00:05 hehonghui

Thanks, andrew, I will be looking forward to your reply .

来自 魅族 MX4

-------- 原始邮件 -------- 发件人:Andrew [email protected] 时间:周三 5月6日 04:16 收件人:bboyfeiyu/AndroidEventBus [email protected] 抄送:"Mr.Simple" [email protected] 主题:Re: [AndroidEventBus] Proguard Instructions (#12)

@bboyfeiyu The app isn't deployed yet. I will make sure that my company is okay with it being in the readme; I don't see why not. I will let you know when it's out there!


Reply to this email directly or view it on GitHub: https://github.com/bboyfeiyu/AndroidEventBus/issues/12#issuecomment-99208580

hehonghui avatar May 06 '15 03:05 hehonghui

@creativedrewy I am collecting apps which adopt AndroidEventBus and they will be put in readme.md. Would it be too much to ask you to share with us your App name and download link? Thank you!

hehonghui avatar Aug 14 '15 08:08 hehonghui

Maybe you should change @org.simple.eventbus.Subscriber <methods>; to @org.simple.eventbus.Subcriber <methods>;. Or please use the latest version.

soxunyi avatar Mar 21 '19 13:03 soxunyi