EventBus 3.2 with incremental annotation processing

EventBus 3.2.0 is now available on Maven Central. In 2020, seven years since version 1.0, EventBus is still one of the most used Android libraries. This update addresses advancements in the Gradle build system and supporting Android libraries.

EventBus 3.2 adds incremental processing to the EventBus annotation processor. This can greatly reduce build times – if all involved annotation processors play along (e.g. ObjectBox is getting there too).

The EventBus annotation processor is used when building EventBus with a subscriber index. This is now recommended for all Android apps. It improves run time performance and avoids crashes by looking up subscriber methods via reflection.

EventBus 3.2 also improves support for JetPack/AndroidX. When looking for @Subscribe methods, it now ignores all base classes from the androidx package and its subpackages, e.g. AppCompatActivity (from androidx.appcompat.app) or Fragment (from androidx.fragment.app). Before 3.2, those classes were scanned using reflection, regardless if a subscriber index was available or not.

Those two changes make EventBus faster and more resilient and we hope you consider making this update soon.

The EventBus library is free open source software. If you like it, we appreciate a star on GitHub, a tweet, or any feedback to us. If you use EventBus in a cool app that is a great showcase for its usefulness, we would love to share a case study with our community. Please get in touch.

greenDAO 3 released

We are happy to announce greenDAO Version 3 today. Since its initial release 5 years ago, greenDAO has always been the fastest ORM for Android. It was also the first ORM to apply code generation for maximum performance. With greenDAO 3, we made code generation much more convenient: by adopting entity annotations you can drop the generator project. In its place comes the all new Gradle plugin, which automatically triggers code generation at build time. Like that, you can simply use greenDAO 3 annotations on your entities:
Continue reading

greenDAO 3 Beta released

We just released greenDAO 3 beta: it makes the generator project optional and moves to Java annotations. Before the final release however, we want to get your feedback. In particular, we experimented with alternative annotation processing that gives greenDAO more power while it avoids byte code manipulation.Our goal with greenDAO3 is to put the developer in control over entity classes while augmenting the entity code with a little bit of generated code.

Continue reading

EventBus 3 released, now based on @Annotations

EventBus3
Today, we are pleased to release EventBus 3. Previous versions of EventBus rejected to use annotations for performance reasons. Now, version 3 embraces annotations to improve performance. How does that make sense? Unfortunately, Android’s performance did not get any better. Reflection on annotations is still very bad compared to Desktop Java, even on Android 6 and ART. EventBus 3 resolves this problem by introducing a new annotation processor, which will index all annotations at build time. It generates a class containing all the data that would be expensive to get at run time. Build-time indexing makes EventBus 3 the fastest EventBus ever.

Continue reading