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

Replace RxJava 2 usages #4087

Closed
erikhuizinga opened this issue Sep 27, 2021 · 2 comments
Closed

Replace RxJava 2 usages #4087

erikhuizinga opened this issue Sep 27, 2021 · 2 comments
Assignees
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements Z-Maintenance

Comments

@erikhuizinga
Copy link
Contributor

erikhuizinga commented Sep 27, 2021

Your use case

What would you like to do?

Replace all dependencies on RxJava 2.

Why would you like to do it?

RxJava 2 has been deprecated since RxJava 3 was available, and has been end-of-life since early 2021: https://github.com/ReactiveX/RxJava/tree/v3.1.1#version-2x. This means that it no longer receives updates, i.e. features and bug fixes. This is a risk that is difficult to quantify, but it will certainly grow as time progresses.

How would you like to achieve it?

Replace all existing dependencies on RxJava 2 with either RxJava 3 (migrate) or alternatives (e.g. Kotlin's observable/flow constructs provided by the standard library and the coroutines library, which are already dependencies in this project).

Some useful resources:

Output of the aforementioned `./gradlew` command on tag `v1.3.0`:
Configuration on demand is an incubating feature.

> Configure project :vector
WARNING:API 'ApkVariantOutput.getVersionCodeOverride()' is obsolete and has been replaced with 'VariantOutput.versionCode()'.
It will be removed in version 7.0 of the Android Gradle plugin.
Gradle Properties must be used to change Variant information.
For more information, see https://d.android.com/r/tools/use-properties.
To determine what is calling ApkVariantOutput.getVersionCodeOverride(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
ABI arm64-v8a 	-> VersionCode = 40103002
ABI armeabi-v7a 	-> VersionCode = 40103001
ABI null 	-> VersionCode = 40103000
ABI x86 	-> VersionCode = 40103003
ABI x86_64 	-> VersionCode = 40103004
ABI arm64-v8a 	-> VersionCode = 40103002
ABI armeabi-v7a 	-> VersionCode = 40103001
ABI null 	-> VersionCode = 40103000
ABI x86 	-> VersionCode = 40103003
ABI x86_64 	-> VersionCode = 40103004
ABI arm64-v8a 	-> VersionCode = 40103002
ABI armeabi-v7a 	-> VersionCode = 40103001
ABI null 	-> VersionCode = 40103000
ABI x86 	-> VersionCode = 40103003
ABI x86_64 	-> VersionCode = 40103004
ABI arm64-v8a 	-> VersionCode = 40103002
ABI armeabi-v7a 	-> VersionCode = 40103001
ABI null 	-> VersionCode = 40103000
ABI x86 	-> VersionCode = 40103003
ABI x86_64 	-> VersionCode = 40103004

> Task :vector:dependencyInsight
io.reactivex.rxjava2:rxandroid:2.1.1
   variant "compile" [
      org.gradle.status                              = release (not requested)
      org.gradle.usage                               = java-api
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.category                            = library (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = debug
         store                                          = gplay
         org.gradle.jvm.environment                     = android
         org.jetbrains.kotlin.platform.type             = androidJvm
   ]
   Selection reasons:
      - By constraint : gplayDebugRuntimeClasspath uses version 2.1.1
      - By ancestor

io.reactivex.rxjava2:rxandroid:2.1.1
\--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxandroid:{strictly 2.1.1} -> 2.1.1
\--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxandroid:2.1.1
+--- com.airbnb.android:mvrx:1.5.1
|    \--- gplayDebugCompileClasspath
+--- com.jakewharton.rxbinding3:rxbinding:3.1.0
|    +--- gplayDebugCompileClasspath
|    +--- com.jakewharton.rxbinding3:rxbinding-material:3.1.0
|    |    \--- gplayDebugCompileClasspath
|    \--- com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0
|         \--- gplayDebugCompileClasspath
+--- com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0 (*)
+--- com.jakewharton.rxbinding3:rxbinding-material:3.1.0 (*)
\--- io.realm:realm-android-library:10.8.0
     +--- gplayDebugCompileClasspath (requested io.realm:realm-android-library:{strictly 10.8.0})
     \--- project :matrix-sdk-android
          \--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxjava:2.2.10
   variant "compile" [
      org.gradle.status                              = release (not requested)
      org.gradle.usage                               = java-api
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.category                            = library (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = debug
         store                                          = gplay
         org.gradle.jvm.environment                     = android
         org.jetbrains.kotlin.platform.type             = androidJvm
   ]
   Selection reasons:
      - By constraint : gplayDebugRuntimeClasspath uses version 2.2.10
      - By ancestor

io.reactivex.rxjava2:rxjava:{strictly 2.2.10} -> 2.2.10
\--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxjava:2.2.10
+--- com.jakewharton.rxbinding3:rxbinding:3.1.0
|    +--- gplayDebugCompileClasspath
|    +--- com.jakewharton.rxbinding3:rxbinding-material:3.1.0
|    |    \--- gplayDebugCompileClasspath
|    \--- com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0
|         \--- gplayDebugCompileClasspath
\--- io.reactivex.rxjava2:rxkotlin:2.4.0
     \--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxjava:2.2.2 -> 2.2.10
\--- com.jakewharton.rxrelay2:rxrelay:2.1.1
     \--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxjava:2.2.6 -> 2.2.10
\--- io.reactivex.rxjava2:rxandroid:2.1.1
     +--- gplayDebugCompileClasspath
     +--- com.jakewharton.rxbinding3:rxbinding-material:3.1.0
     |    \--- gplayDebugCompileClasspath
     +--- com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0
     |    \--- gplayDebugCompileClasspath
     +--- com.jakewharton.rxbinding3:rxbinding:3.1.0
     |    +--- gplayDebugCompileClasspath
     |    +--- com.jakewharton.rxbinding3:rxbinding-material:3.1.0 (*)
     |    \--- com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0 (*)
     +--- io.realm:realm-android-library:10.8.0
     |    +--- gplayDebugCompileClasspath (requested io.realm:realm-android-library:{strictly 10.8.0})
     |    \--- project :matrix-sdk-android
     |         \--- gplayDebugCompileClasspath
     \--- com.airbnb.android:mvrx:1.5.1
          \--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxjava:2.2.9 -> 2.2.10
\--- com.airbnb.android:mvrx:1.5.1
     \--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxkotlin:2.4.0
   variant "compile" [
      org.gradle.status                              = release (not requested)
      org.gradle.usage                               = java-api
      org.gradle.libraryelements                     = jar (not requested)
      org.gradle.category                            = library (not requested)

      Requested attributes not found in the selected variant:
         com.android.build.api.attributes.BuildTypeAttr = debug
         store                                          = gplay
         org.gradle.jvm.environment                     = android
         org.jetbrains.kotlin.platform.type             = androidJvm
   ]
   Selection reasons:
      - By constraint : gplayDebugRuntimeClasspath uses version 2.4.0

io.reactivex.rxjava2:rxkotlin:2.4.0
\--- gplayDebugCompileClasspath

io.reactivex.rxjava2:rxkotlin:{strictly 2.4.0} -> 2.4.0
\--- gplayDebugCompileClasspath

(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

Have you considered any alternatives?

No response

Additional context

No response


tags for search: rx rxjava rxkotlin rxandroid reactive reactivex

@erikhuizinga erikhuizinga added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Sep 27, 2021
@ganfra
Copy link
Member

ganfra commented Sep 27, 2021

Thanks for the intel. We are planning to move away from Rx to use Kotlin coroutines Flow in the near future.

@bmarty bmarty self-assigned this Oct 26, 2021
@bmarty
Copy link
Member

bmarty commented Jan 17, 2022

Finalized in #4942

@bmarty bmarty closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements Z-Maintenance
Projects
None yet
Development

No branches or pull requests

3 participants