Use new library for injekt with inorichi patch

This commit is contained in:
AntsyLich 2024-09-08 20:09:45 +06:00
parent c8ad6cdf31
commit 83fd4746ed
No known key found for this signature in database
5 changed files with 6 additions and 4 deletions

View file

@ -214,7 +214,7 @@ dependencies {
implementation(libs.preferencektx) implementation(libs.preferencektx)
// Dependency injection // Dependency injection
implementation(libs.injekt.core) implementation(libs.injekt)
// Image loading // Image loading
implementation(platform(libs.coil.bom)) implementation(platform(libs.coil.bom))

View file

@ -21,6 +21,7 @@ import coil3.network.okhttp.OkHttpNetworkFetcherFactory
import coil3.request.allowRgb565 import coil3.request.allowRgb565
import coil3.request.crossfade import coil3.request.crossfade
import coil3.util.DebugLogger import coil3.util.DebugLogger
import dev.mihon.injekt.patchInjekt
import eu.kanade.domain.DomainModule import eu.kanade.domain.DomainModule
import eu.kanade.domain.base.BasePreferences import eu.kanade.domain.base.BasePreferences
import eu.kanade.domain.ui.UiPreferences import eu.kanade.domain.ui.UiPreferences
@ -73,6 +74,7 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
@SuppressLint("LaunchActivityFromNotification") @SuppressLint("LaunchActivityFromNotification")
override fun onCreate() { override fun onCreate() {
super<Application>.onCreate() super<Application>.onCreate()
patchInjekt()
GlobalExceptionHandler.initialize(applicationContext, CrashActivity::class.java) GlobalExceptionHandler.initialize(applicationContext, CrashActivity::class.java)

View file

@ -40,7 +40,7 @@ sqlite-android = "com.github.requery:sqlite-android:3.45.0"
preferencektx = "androidx.preference:preference-ktx:1.2.1" preferencektx = "androidx.preference:preference-ktx:1.2.1"
injekt-core = "uy.kohesive.injekt:injekt-core:1.16.1" injekt = "com.github.mihonapp:injekt:91edab2317"
coil-bom = { module = "io.coil-kt.coil3:coil-bom", version = "3.0.0-alpha10" } coil-bom = { module = "io.coil-kt.coil3:coil-bom", version = "3.0.0-alpha10" }
coil-core = { module = "io.coil-kt.coil3:coil" } coil-core = { module = "io.coil-kt.coil3:coil" }

View file

@ -26,5 +26,5 @@ dependencies {
implementation(platform(libs.coil.bom)) implementation(platform(libs.coil.bom))
implementation(libs.coil.core) implementation(libs.coil.core)
api(libs.injekt.core) api(libs.injekt)
} }

View file

@ -10,7 +10,7 @@ kotlin {
val commonMain by getting { val commonMain by getting {
dependencies { dependencies {
api(kotlinx.serialization.json) api(kotlinx.serialization.json)
api(libs.injekt.core) api(libs.injekt)
api(libs.rxjava) api(libs.rxjava)
api(libs.jsoup) api(libs.jsoup)