Skip to content

asamm/EventBus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

553 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventBus (Asamm Fork)

Fork of greenrobot/EventBus 3.3.1 with critical bug fixes for modern Android (API 35+, AndroidX, R8 full mode).

The upstream project is no longer actively maintained (last release Feb 2024, 147 open issues). This fork applies minimal, targeted patches to keep EventBus working with current Android toolchains.

Changes from upstream 3.3.1

SubscriberMethodFinder — fix NoClassDefFoundError during register():

  • Check @Subscribe annotation before getParameterTypes() to avoid unnecessary class loading for non-subscriber methods (based on PR #560)
  • Catch NoClassDefFoundError in getAnnotation() for methods referencing classes unavailable on the current API level (based on PR #293)
  • Catch NoClassDefFoundError in getParameterTypes() for methods with parameter types from newer API levels (e.g. PictureInPictureUiState on API < 35, ComponentCaller on API < 35). See issue #737, issue #726
  • Add null-check in moveToSuperclass() after getSuperclass() (based on PR #560)

Add to your project

Available via JitPack.

Add the JitPack repository (if not already present):

// settings.gradle.kts
repositories {
    maven(url = "https://jitpack.io")
}

Android projects:

implementation("com.github.asamm.EventBus:eventbus:3.5.0")

Java-only projects:

implementation("com.github.asamm.EventBus:eventbus-java:3.5.0")

R8, ProGuard

This library ships with embedded rules.

Upstream documentation

For general EventBus usage, see the original documentation.

License

Copyright (C) 2012-2021 Markus Junginger, greenrobot (https://greenrobot.org)

EventBus binaries and source code can be used according to the Apache License, Version 2.0.

About

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 95.5%
  • CSS 4.5%