Migrade room and koin dependencies into version catalog

This commit is contained in:
Shinokuni 2024-03-30 19:35:43 +01:00
parent b943822194
commit 1a92684c18
5 changed files with 36 additions and 33 deletions

View File

@ -54,8 +54,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.0'
testImplementation "io.insert-koin:koin-test-junit4:$rootProject.ext.koin_version"
testImplementation "io.insert-koin:koin-test:$rootProject.ext.koin_version"
implementation(libs.bundles.koin)
testImplementation(libs.bundles.kointest)
implementation 'com.gitlab.mvysny.konsume-xml:konsume-xml:1.0'
implementation 'org.redundent:kotlin-xml-builder:1.7.3'

View File

@ -87,8 +87,12 @@ dependencies {
implementation "androidx.fragment:fragment-ktx:1.3.5"
implementation "androidx.browser:browser:1.3.0"
implementation(libs.bundles.koin)
testImplementation(libs.bundles.kointest)
/*
testImplementation "io.insert-koin:koin-test:$rootProject.ext.koin_version"
testImplementation "io.insert-koin:koin-test-junit4:$rootProject.ext.koin_version"
*/
implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
@ -113,20 +117,5 @@ dependencies {
debugImplementation 'com.facebook.soloader:soloader:0.10.1'
debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.96.1'
def composeBom = platform('androidx.compose:compose-bom:2022.12.00')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.activity:activity-compose:1.5.1'
implementation 'androidx.compose.material3:material3'
def voyager = "1.0.0-rc03"
implementation "cafe.adriel.voyager:voyager-navigator:$voyager"
implementation "cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyager"
implementation "cafe.adriel.voyager:voyager-tab-navigator:$voyager"
implementation "cafe.adriel.voyager:voyager-androidx:$voyager"
//implementation "cafe.adriel.voyager:voyager-koin:$voyager"
debugImplementation "androidx.compose.ui:ui-tooling:1.3.3"
implementation "androidx.compose.ui:ui-tooling-preview:1.3.3"
implementation(libs.bundles.room)
}

View File

@ -80,10 +80,10 @@ dependencies {
implementation(libs.bundles.coroutines)
androidTestImplementation(libs.coroutines.test)
androidTestImplementation "io.insert-koin:koin-test-junit4:$rootProject.ext.koin_version"
androidTestImplementation "io.insert-koin:koin-test:$rootProject.ext.koin_version"
implementation(libs.bundles.room)
implementation(libs.bundles.koin)
androidTestImplementation(libs.bundles.kointest)
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.9.0'
}

View File

@ -76,13 +76,9 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
def room_version = "2.6.1"
api "androidx.room:room-runtime:$room_version"
api "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
androidTestImplementation "androidx.room:room-testing:$room_version"
implementation "androidx.room:room-paging:$room_version"
implementation(libs.bundles.room)
kapt(libs.room.compiler)
androidTestImplementation(libs.room.testing)
implementation 'com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.4'
kapt 'com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.4'
@ -92,10 +88,8 @@ dependencies {
api 'joda-time:joda-time:2.10.10'
api "io.insert-koin:koin-core:$rootProject.ext.koin_version"
api "io.insert-koin:koin-android:$rootProject.ext.koin_version"
api "io.insert-koin:koin-androidx-compose:3.4.2"
api "io.insert-koin:koin-android-compat:$rootProject.ext.koin_version"
implementation(libs.bundles.koin)
testImplementation(libs.bundles.kointest)
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'

View File

@ -4,6 +4,8 @@ voyager = "1.0.0"
lifecycle = "2.7.0"
coil = "2.4.0"
coroutines = "1.8.0"
room = "2.6.1"
koin-bom = "3.5.0"
[libraries]
bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
@ -35,6 +37,21 @@ coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", ve
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
room-rxjava2 = { module = "androidx.room:room-rxjava2", version.ref = "room" } #TODO remove usage of this
room-paging = { module = "androidx.room:room-paging", version.ref = "room" }
room-testing = { module = "androidx.room:room-testing", version.ref = "room" }
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin-bom" }
koin-core = { module = "io.insert-koin:koin-core" }
koin-android = { module = "io.insert-koin:koin-android" }
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose" }
koin-android-compat = { module = "io.insert-koin:koin-android-compat" } #TODO remove usage of this
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin-bom" }
koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "koin-bom" }
[bundles]
compose = ["bom", "compose-foundation", "compose-runtime", "compose-animation",
"compose-ui", "compose-ui-tooling", "compose-ui-tooling-preview", "compose-material3"]
@ -43,3 +60,6 @@ lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-viewmodel-compose", "lifecycl
"lifecyle-runtime-compose"]
coil = ["coil-core", "coil-compose"]
coroutines = ["coroutines-core", "coroutines-android"]
room = ["room-runtime", "room-ktx", "room-rxjava2", "room-paging"]
koin = ["koin-bom", "koin-core", "koin-android", "koin-androidx-compose", "koin-android-compat"]
kointest = ["koin-test", "koin-test-junit4"]