konmik / nucleus

Nucleus is an Android library, which utilizes the Model-View-Presenter pattern to properly connect background tasks with visual parts of an application.
MIT License
1.97k stars 253 forks source link

RxJava2 Support #111

Closed Dev-iL closed 7 years ago

Dev-iL commented 8 years ago

Hello Konstantin,

Do your long-term plans for the library include the adoption of RxJava v2? It had recently reached RC1, which means the API should be quite stable by now.

If yes, perhaps there's sense in creating another branch of nucleus containing preparations/adaptations for the new RxJava?

I might be able to help with some crude initial conversion if needed.

konmik commented 8 years ago

Hi, feel free to make a pull request.

But I would first wait for the final release.

Dev-iL commented 8 years ago

v2 is released as of 3 days ago: https://github.com/ReactiveX/RxJava/releases/tag/v2.0.0

konmik commented 7 years ago

great, I will take a look! :)

Seidak commented 7 years ago

Hi, any news about rxjava2 support? :-)

konmik commented 7 years ago

I finally decided how to make the transition correctly (and accumulated some experience using rx2 as well). So I target next week for releasing rx2-based artifacts.

mptrista commented 7 years ago

Hey @konmik,

Do you need any specific help with this task?

konmik commented 7 years ago

Hey, this week I'm releasing the beta. The job is already 90% done, all tests pass.

konmik commented 7 years ago

It took longer than expected though. :D

konmik commented 7 years ago

Thanks for pinging me, btw!

konmik commented 7 years ago

'info.android15.nucleus5:nucleus:5.0.0-beta1' was just released and will be available in a few hours on maven central.

The new package name is nucleus5, branch is https://github.com/konmik/nucleus/tree/rx2.

All examples were updated.

konmik commented 7 years ago

Did anyone try it? :D

Any issues?

Is it ok to mention the build on the main page?

Seidak commented 7 years ago

I am really busy this month, I'll definitely try it! And as soon as possible I'll give you feedback

gallal commented 7 years ago

Thanks @konmik - I'll try it soon and let you know

fmontesino commented 7 years ago

Tested all day long, everything seems fine for me! Thanks for your work @konmik

w00lyc0dy commented 7 years ago

Hi there :) Thanks for the work @konmik ! Everything works fine, but I have a question regarding the Flowable class: will it be supported for the restartable methods ?

sreejithraman commented 7 years ago

any updates on this?

konmik commented 7 years ago

No complains so far, use it! :)

TWiStErRob commented 7 years ago

@konmik https://github.com/konmik/nucleus/issues/111#issuecomment-293505584 sounds like a complaint ;)

konmik commented 7 years ago

I consider flowable to be an optional stream type that is easy to convert into observable. Otherwise we would need to implement restartables for all rxjava stream types, too much of pointless work. You can easily write your own function that will convert stream types you need automatically.

Seidak commented 7 years ago

@konmik maybe you should update readme for better orientation for new users. Instead of compile 'info.android15.nucleus5:nucleus:5.0.0-beta' would be better to have there compile 'info.android15.nucleus5:nucleus:5.0.0-beta1'

I am finally going to test the update! :-)

shadow7 commented 6 years ago

@konmik "I consider flowable to be an optional stream type that is easy to convert into observable". I do not believe this is so simple, the Flowable object in Rxjava2 allows us to handle the concept of back pressure. Using .toObeservable() on these objects converts them into a non-backpressured Observable. I agree that this would be arduous work, but not pointless.