Skip to content

2.0.0

RxJava3

One of the big changes in 2.0.0 is implementing Rxjava3 to the codebase. In the actual implementation, there's no changes big changes to be made unless the imports.

Use Ctrl+Shift+R to replace those import, some changes may include:

//from
import io.reactivex.Single
//to
import io.reactivex.rxjava3.core.Single

//from
import io.reactivex.Flowable
//to
import io.reactivex.rxjava3.core.Flowable

//from
import io.reactivex.Observable
//to
import io.reactivex.rxjava3.core.Observable

//from
import io.reactivex.Completable
//to
import io.reactivex.rxjava3.core.Completable

//from
import io.reactivex.schedulers.Schedulers
//to
import io.reactivex.rxjava3.schedulers.Schedulers

Service Module

Initially module service handle both Firebase and AppGallery Connect feature implementation simultaneously. But not many product need to implement both at the same time. The service module now have two sub modules.

Not much code change during this migration, but the dependency declaration will changes based on which service will you use for your project.

build.gradle.kts
val versionYouNeed = "1.0.0"

// Before
implementation("android:codebase-service:$versionYouNeed")

//After
// Add this when using Firebase
implementation("android:codebase-firebase:$versionYouNeed")
// Add this when using Huawei
implementation("android:codebase-huawei:$versionYouNeed")

Both class implement the service module from the same Class. The service module will route which feature you will use based on modules added in Gradle configuration using reflection.