-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Feature/retrofit2 rx #1928
Feature/retrofit2 rx #1928
Conversation
@kungfoo thanks for the contribution. Would it be better to keep just one Retrofit2 template and add the support of RxJava via a CLI option (e.g. supportRxJava) ? |
I thought about that, but then again, the dependencies might be quite On Thu, Jan 21, 2016 at 4:52 AM, wing328 [email protected] wrote:
|
Can I add options for the library to |
I think it works both way.If you look at the |
Okay, I will try adding it as an option |
b57c3e3
to
1ba22dc
Compare
I updated the PR to change the existing templates rather than create new On Thu, Jan 21, 2016 at 11:01 AM, wing328 [email protected] wrote:
|
One suggestion is to create a Then copy the unit test from |
Will do, I will have to rewrite the tests to use Observable. I can use java-8 in the sample, right? |
My understanding is that both Retrofit2 and RxJava support Java7 so I would suggest using Java7 for now. |
As far as I know, both libraries support java-8, RxJava is even more fun to On Fri, Jan 22, 2016 at 9:51 AM, wing328 [email protected] wrote:
|
Or do you regenerate the samples on every build? |
@kungfoo you've to generate the samples manually by running the corresponding shell script under |
Which is what I did. I still had to adjust the tests to use the API provided with the RxJavaAdapter of retrofit. |
If you're referring to the CI tests, which is triggered by I would recommend updating pom.xml to include the retrofit2rx later (as a day 2 requirement) |
Hmm, the tests now fail on 1.7, I see. I did add samples that are 1.8 under Actually: The generated client code could actually be 1.7 as long as the tests that are executed can be 1.8, which is a problem on Travis, as far as I can tell. Bummer. |
I did add the samples and tests and rewrote them using java 7, so now they On Fri, 22 Jan 2016, 15:23 wing328 [email protected] wrote:
|
@kungfoo thanks! Do you mind pulling the latest master and rebase on that to resolve the merge conflicts? |
Nope, will do asap.
|
I highly doubt this code is ever executed.
This still uses retrofit 2.0.0-beta2 because the api in beta3 has changed and the package has been renamed to retrofit2.* Change retrofit-rx to be a library option
This is so that the sample gets compiled and executed on mvn verify.
b59b17d
to
e347063
Compare
I did some tests and the result looks good. PR merged |
It should be able to use the RxJava flavor of retrofit, so I added a generator option for that.