Skip to content

[JAVA] RxJava2 support  #4698

@ber4444

Description

@ber4444
Description

When using the configuration settings,

  "library": "retrofit2",
  "useRxJava": true,

we are getting these dependencies:

ext {
    retrofit_version = "2.0.2"
    rx_java_version = "1.1.3"
}
dependencies {
    compile "com.squareup.retrofit2:retrofit:$retrofit_version"
    compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
    compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
    compile "io.reactivex:rxjava:$rx_java_version"

However, we would like to add a useRxJava2 setting which would result in:

ext {
    retrofit_version = "2.0.2"
    rx_java_version = "2.0.1"
}
dependencies {
    compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
    compile "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    compile "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
    compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
Related issues

Similar to this PR:
https://github.com/swagger-api/swagger-codegen/pull/1928/files

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions