Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidX support #552

Closed
cckroets opened this issue Oct 11, 2018 · 22 comments
Closed

AndroidX support #552

cckroets opened this issue Oct 11, 2018 · 22 comments
Milestone

Comments

@cckroets
Copy link

Now that Android Studio 3.2.0 and androidx 1.0.0 libraries have been released, is there a plan to migrate to androidx? Google has said there won't be any more feature releases under the android.support packaging.

@greenrobot-team
Copy link
Collaborator

Please refer to https://developer.android.com/jetpack/androidx/migrate on how to use AndroidX with libraries that do not yet use the new imports.

Keeping this open to track switching to AndroidX.
-ut

@themockgraeme
Copy link

I've been having an issue with AndroidX whereby I get a NoClassDefFoundError when the find methods code walks down the inheritance tree.

A quick and dirty fix would be to filter for androidx packages in the moveToSuperclass() method. I've created a pull request for this, and it'd make sense from a performance perspective too.

@cckroets
Copy link
Author

cckroets commented Apr 8, 2020

AndroidX has been out for over a year now. Is there any update on this? This is the last non-AndroidX library in my project's external dependencies.

@greenrobot-team
Copy link
Collaborator

https://github.com/greenrobot/EventBus/releases/tag/V3.2.0

And the remaining code that uses the legacy Android Support Library APIs should not be used, anyhow (e.g. ErrorDialogManager).

@cckroets I use the latest release in an AndroidX project without issues. What is preventing you from doing so?

@cckroets
Copy link
Author

It requires enabling Jetifier which adds time to the build. It will analyze and re-write every external dependency to use AndroidX, which can be expensive for large projects.

@Malachiasz
Copy link

Any plan to support AndroidX? Why the pull request is being ignored #627 ?

We want to get rid of Jetifier which slows down builds, so is there a chance that EventBus will get migrated or should we rather remove it from our dependencies?

Repository owner deleted a comment from bigcal6977 Jun 8, 2020
@jingibus
Copy link

In order to improve our build times (which are a pain point in our codebase), we're currently pushing to remove jetifier from our builds. This change has had two years to bake, and apart from the build speed wins we're excited to simplify our system by eliminating this legacy concern.

We don't directly rely on EventBus, but it is a transitive dependency used by a third party library we use. Unfortunately, jetifier cannot be selectively turned on and off for each individual project: it's either all or nothing. So EventBus is blocking this goal for us.

@pvegh
Copy link

pvegh commented Dec 17, 2020

And the remaining code that uses the legacy Android Support Library APIs should not be used, anyhow (e.g. ErrorDialogManager).

Then please release 3.3 removing those classed. It's high time!
We want to remove Jetifier for better build performance as well. EventBus is standing in the way.

@pvegh
Copy link

pvegh commented Jan 14, 2021

Anybody there?
A month without answer. 2 years ignoring the problem.
We have now decided to remove EventBus from our project.

@greenrobot-team
Copy link
Collaborator

Sorry, busy with other things.

Using AndroidX would require making EventBus into an Android library (AAR), have not had time to look into resolving this (e.g. there still should be a plain Java version).

@Malachiasz
Copy link

But should it really be available as plain Java? I know that it would be nice, but does the library have substantial amount of non-android users?

@Amrsatrio
Copy link

Amrsatrio commented Mar 19, 2021

I do use this libary in my shared API and business logic module between my JVM Discord Bot and Android App. So this library should be kept compatible for plain Java in my opinion.
Unfortunately, my app takes between 2-10 minutes to build from scratch, and I want to reduce it by disabling Jetifier. But this library is one of the libs that still reference the old Android support libraries, which is sad.

@andob
Copy link
Contributor

andob commented Apr 3, 2021

maybe would be better to just remove all android dependencies, and make this library a pure java library. no need for jetifier or androidx then.

what is the plan for this?
the pull request with androidx conversion is ignored, would a pull request with conversion to pure java be welcomed? :D

@pvegh
Copy link

pvegh commented Apr 26, 2021

We decided to remove EventBus from our project.
Thanks for not caring, it was the reason we needed to get rid of this legacy dependency which is now considered a technical debt.

@sarbyn
Copy link

sarbyn commented Jun 30, 2021

Any update about this issue? Like others developers, this is the last legacy dependencies in our project.
Can someone suggest us a modern alternatives to eventBus for android project?

@Amrsatrio
Copy link

Amrsatrio commented Jun 30, 2021

The recommended solution for that right now is Kotlin Coroutines but you have to learn a whole new thing just to use that.

Not to mention Google Guava has EventBus functionality although marked as beta.

@andob
Copy link
Contributor

andob commented Jun 30, 2021

@sarbyn @Amrsatrio new version is on its way. I made a pull request with the changes, now new code is being polished and tested by @greenrobot-team . will be released soon I hope :)

@Malachiasz
Copy link

@greenrobot-team When will the separate android event bus artifact without support libraries be available? I see it's waiting for a review since July: #670

@ooyellow58
Copy link

Have been patiently waited for the migration for long long time, hopefully it could be done soon. Thanks for all your effort!

@matejdro
Copy link

matejdro commented Nov 26, 2021

It looks like Google plans to get rid of Jetifier in the future AGP release: https://issuetracker.google.com/issues/141128458#comment13

@greenrobot-team
Copy link
Collaborator

A preview release that resolves this issue is now available: 3.3.0-SNAPSHOT

If you want to help test this, you need to add the OSSRH snapshot repository in your build.gradle.kts:

allprojects {
    repositories {
        maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
    }
}

@greenrobot-team
Copy link
Collaborator

This is now resolved as part of the 3.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests