Skip to content

Commit e285fb7

Browse files
authored
Merge pull request #730 from code-payments/chore/remove-rxjava
chore: remove RxJava dependency entirely
2 parents 4584eeb + 715f9ec commit e285fb7

11 files changed

Lines changed: 1 addition & 34 deletions

File tree

apps/flipcash/app/src/main/kotlin/com/flipcash/app/FlipcashApp.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ import coil3.request.crossfade
1414
import com.flipcash.app.auth.AuthManager
1515
import com.flipcash.app.currency.PreferredCurrencyController
1616
import com.getcode.opencode.repositories.EventRepository
17-
import com.getcode.utils.ErrorUtils
1817
import com.getcode.utils.trace
1918
import dagger.hilt.android.HiltAndroidApp
20-
import io.reactivex.rxjava3.plugins.RxJavaPlugins
2119
import javax.inject.Inject
2220

2321
@HiltAndroidApp
@@ -44,10 +42,6 @@ class FlipcashApp : Application(), Configuration.Provider, SingletonImageLoader.
4442
override fun onCreate() {
4543
super.onCreate()
4644

47-
RxJavaPlugins.setErrorHandler {
48-
ErrorUtils.handleError(it)
49-
}
50-
5145
authManager.init()
5246

5347
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)

gradle/libs.versions.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ hilt = "2.59.2"
4242
hilt-jetpack = "1.3.0"
4343
okhttp = "5.3.2"
4444
retrofit = "3.0.0"
45-
rxjava = "3.1.12"
46-
rxandroid = "3.0.2"
47-
4845
kin-sdk = "2.1.2"
4946
grpc-android = "1.81.0"
5047
slf4j = "1.7.36"
@@ -130,7 +127,6 @@ lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewm
130127
androidx-browser = { module = "androidx.browser:browser", version.ref = "androidx-browser" }
131128
androidx-paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "androidx-paging" }
132129
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
133-
androidx-room-rxjava3 = { module = "androidx.room:room-rxjava3", version.ref = "androidx-room" }
134130
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
135131
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "androidx-room" }
136132
androidx-room-paging = { module = "androidx.room:room-paging", version.ref = "androidx-room" }
@@ -163,7 +159,6 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
163159
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
164160
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
165161
kotlinx-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
166-
kotlinx-coroutines-rx3 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3", version.ref = "kotlinx-coroutines" }
167162
kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version = "0.4.0" }
168163
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
169164
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
@@ -200,10 +195,6 @@ voyager-bottomsheet = { module = "cafe.adriel.voyager:voyager-bottom-sheet-navig
200195
voyager-tabs = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager" }
201196
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
202197

203-
# RxJava
204-
rxjava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" }
205-
rxandroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" }
206-
207198
# Networking / gRPC / Protobuf
208199
slf4j = { module = "org.slf4j:slf4j-android", version.ref = "slf4j" }
209200
grpc-android = { module = "io.grpc:grpc-android", version.ref = "grpc-android" }

libs/locale/impl/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies {
1414
api(libs.androidx.annotation)
1515
api(libs.kotlin.stdlib)
1616
api(libs.kotlinx.coroutines.core)
17-
api(libs.kotlinx.coroutines.rx3)
1817

1918
implementation(libs.bundles.hilt)
2019
ksp(libs.bundles.hilt.compiler)

libs/locale/public/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ dependencies {
1313
api(libs.androidx.annotation)
1414
api(libs.kotlin.stdlib)
1515
api(libs.kotlinx.coroutines.core)
16-
api(libs.kotlinx.coroutines.rx3)
1716
}

libs/logging/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ dependencies {
2929

3030
api(libs.timber)
3131
implementation(libs.androidx.annotation)
32-
implementation(libs.rxjava)
3332
implementation(libs.grpc.kotlin)
3433
implementation(project(":libs:messaging"))
3534
}

libs/logging/src/main/kotlin/com/getcode/utils/ErrorUtils.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import com.getcode.manager.TopBarManager
66
import io.grpc.Status
77
import io.grpc.StatusException
88
import io.grpc.StatusRuntimeException
9-
import io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException
10-
import io.reactivex.rxjava3.exceptions.UndeliverableException
119
import kotlinx.coroutines.CancellationException
1210
import kotlinx.coroutines.TimeoutCancellationException
1311
import timber.log.Timber
@@ -40,7 +38,7 @@ object ErrorUtils {
4038
if (isGmsTransientError(throwable)) return
4139

4240
val throwableCause: Throwable =
43-
if (throwable.cause != null && (throwable is UndeliverableException || throwable is OnErrorNotImplementedException || throwable is CodeServerError))
41+
if (throwable.cause != null && throwable is CodeServerError)
4442
throwable.cause ?: throwable
4543
else throwable
4644

services/flipcash-compose/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ dependencies {
3636
implementation(libs.androidx.lifecycle.runtime)
3737
implementation(libs.androidx.room.runtime)
3838
implementation(libs.androidx.room.ktx)
39-
implementation(libs.androidx.room.rxjava3)
4039
implementation(libs.androidx.room.paging)
4140
implementation(libs.okhttp)
4241
implementation(libs.mixpanel)

services/flipcash/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ dependencies {
4141
implementation(libs.androidx.lifecycle.runtime)
4242
implementation(libs.androidx.room.runtime)
4343
implementation(libs.androidx.room.ktx)
44-
implementation(libs.androidx.room.rxjava3)
4544
implementation(libs.androidx.room.paging)
4645
implementation(libs.okhttp)
4746
implementation(libs.mixpanel)

ui/navigation/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ dependencies {
1818
api(project(":ui:resources"))
1919
implementation(project(":ui:theme"))
2020

21-
api(libs.rxjava)
22-
2321
implementation(libs.compose.material3)
2422
implementation(libs.compose.activities)
2523
implementation(libs.bundles.kotlinx.serialization)

ui/navigation/src/main/kotlin/com/getcode/view/BaseViewModel.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@ package com.getcode.view
22

33
import androidx.lifecycle.ViewModel
44
import com.getcode.util.resources.ResourceHelper
5-
import io.reactivex.rxjava3.disposables.CompositeDisposable
65

76
@Deprecated(
87
message = "Replaced With BaseViewModel2",
98
replaceWith = ReplaceWith("Use BaseViewModel2", "com.getcode.view.BaseViewModel2"))
109
abstract class BaseViewModel(
1110
private val resources: ResourceHelper,
1211
) : ViewModel() {
13-
private val compositeDisposable = CompositeDisposable()
14-
15-
override fun onCleared() {
16-
super.onCleared()
17-
compositeDisposable.clear()
18-
}
19-
2012
open fun setIsLoading(isLoading: Boolean) {}
2113

2214
fun getString(resId: Int): String = resources.getString(resId)

0 commit comments

Comments
 (0)