Migrate last dependencies to version catalog

This commit is contained in:
Shinokuni 2024-07-05 13:52:59 +02:00
parent 10835b4979
commit e6be6c36fe
4 changed files with 54 additions and 48 deletions

View File

@ -26,11 +26,10 @@ dependencies {
coreLibraryDesugaring(libs.jdk.desugar) coreLibraryDesugaring(libs.jdk.desugar)
testImplementation("junit:junit:4.13") testImplementation(libs.junit4)
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test:runner:1.4.0") implementation(libs.coroutines.core)
androidTestImplementation("androidx.test:rules:1.4.0") testImplementation(libs.coroutines.test)
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
implementation(libs.bundles.koin) implementation(libs.bundles.koin)
testImplementation(libs.bundles.kointest) testImplementation(libs.bundles.kointest)
@ -41,19 +40,12 @@ dependencies {
implementation(libs.okhttp) implementation(libs.okhttp)
testImplementation(libs.okhttp.mockserver) testImplementation(libs.okhttp.mockserver)
implementation("com.squareup.retrofit2:retrofit:2.9.0") { implementation(libs.bundles.retrofit) {
exclude("com.squareup.okhttp3", "okhttp3") exclude("com.squareup.okhttp3", "okhttp3")
}
implementation("com.squareup.retrofit2:converter-moshi:2.9.0") {
exclude("com.squareup.moshi", "moshi") exclude("com.squareup.moshi", "moshi")
} }
implementation("com.squareup.moshi:moshi:1.15.1") implementation(libs.moshi)
implementation(libs.jsoup)
api("org.jsoup:jsoup:1.13.1") implementation(libs.jodatime)
debugApi("com.chimerapps.niddler:niddler:1.5.5")
releaseApi("com.chimerapps.niddler:niddler-noop:1.5.5")
testImplementation(libs.coroutines.test)
} }

View File

@ -50,18 +50,21 @@ dependencies {
coreLibraryDesugaring(libs.jdk.desugar) coreLibraryDesugaring(libs.jdk.desugar)
implementation("androidx.core:core-ktx:1.7.0") implementation(libs.corektx)
implementation("androidx.appcompat:appcompat:1.6.1") implementation(libs.appcompat)
implementation("com.google.android.material:material:1.8.0") implementation(libs.material)
implementation(libs.palette)
implementation(libs.workmanager)
implementation(libs.encrypted.preferences)
testImplementation("junit:junit:4.13.2") implementation(libs.jsoup)
androidTestImplementation("androidx.test.ext:junit:1.1.5") implementation(libs.jodatime)
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
testImplementation(libs.junit4)
androidTestImplementation(libs.bundles.test)
implementation(platform(libs.compose.bom))
implementation(libs.bundles.compose) implementation(libs.bundles.compose)
implementation(libs.compose.activity)
implementation("androidx.palette:palette-ktx:1.0.0")
implementation(libs.bundles.voyager) implementation(libs.bundles.voyager)
implementation(libs.bundles.lifecycle) implementation(libs.bundles.lifecycle)
@ -76,9 +79,5 @@ dependencies {
implementation(libs.bundles.koin) implementation(libs.bundles.koin)
androidTestImplementation(libs.bundles.kointest) androidTestImplementation(libs.bundles.kointest)
androidTestImplementation("com.squareup.okhttp3:mockwebserver:4.9.0") androidTestImplementation(libs.okhttp.mockserver)
implementation(libs.encrypted.preferences)
implementation(libs.work.manager)
} }

View File

@ -35,25 +35,19 @@ android {
// Needed for kapt starting with kotlin plugin 1.5 // Needed for kapt starting with kotlin plugin 1.5
kapt { kapt {
arguments { arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString()) arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true") arg("room.incremental", "true")
} }
} }
dependencies { dependencies {
coreLibraryDesugaring(libs.jdk.desugar) coreLibraryDesugaring(libs.jdk.desugar)
api("androidx.core:core-ktx:1.6.0") implementation(libs.corektx)
api("androidx.appcompat:appcompat:1.3.0") implementation(libs.appcompat)
api("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0")
testImplementation("junit:junit:4.13") testImplementation(libs.junit4)
androidTestImplementation("androidx.test.ext:junit:1.1.3") androidTestImplementation(libs.bundles.test)
androidTestImplementation("androidx.test:runner:1.4.0")
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
implementation(libs.bundles.room) implementation(libs.bundles.room)
kapt(libs.room.compiler) kapt(libs.room.compiler)
@ -61,7 +55,7 @@ dependencies {
implementation(libs.bundles.paging) implementation(libs.bundles.paging)
api("joda-time:joda-time:2.10.10") //TODO replace with java.time? implementation(libs.jodatime)
implementation(libs.bundles.koin) implementation(libs.bundles.koin)
testImplementation(libs.bundles.kointest) testImplementation(libs.bundles.kointest)

View File

@ -1,5 +1,5 @@
[versions] [versions]
compose-bom = "2024.02.02" compose_bom = "2024.02.02"
voyager = "1.0.0" voyager = "1.0.0"
lifecycle = "2.7.0" lifecycle = "2.7.0"
coil = "2.4.0" coil = "2.4.0"
@ -8,9 +8,10 @@ room = "2.6.1"
koin-bom = "3.5.0" koin-bom = "3.5.0"
paging = "3.2.1" paging = "3.2.1"
okhttp = "4.11.0" okhttp = "4.11.0"
retrofit = "2.9.0"
[libraries] [libraries]
bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" } compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose_bom" }
compose-foundation = { module = "androidx.compose.foundation:foundation" } compose-foundation = { module = "androidx.compose.foundation:foundation" }
compose-runtime = { module = "androidx.compose.runtime:runtime" } compose-runtime = { module = "androidx.compose.runtime:runtime" }
compose-animation = { module = "androidx.compose.animation:animation" } compose-animation = { module = "androidx.compose.animation:animation" }
@ -58,18 +59,36 @@ paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pag
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-mockserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" } okhttp-mockserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-convertermoshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" }
konsumexml = "com.gitlab.mvysny.konsume-xml:konsume-xml:1.1" konsumexml = "com.gitlab.mvysny.konsume-xml:konsume-xml:1.1"
kotlinxmlbuilder = "org.redundent:kotlin-xml-builder:1.7.3" #TODO update this kotlinxmlbuilder = "org.redundent:kotlin-xml-builder:1.7.3" #TODO update this
jdk-desugar = "com.android.tools:desugar_jdk_libs:2.0.4" jdk-desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
jsoup = "org.jsoup:jsoup:1.16.1"
moshi = "com.squareup.moshi:moshi:1.15.1"
jodatime = "joda-time:joda-time:2.10.10" #TODO replace by java.time
# androidx
corektx = "androidx.core:core-ktx:1.13.1"
appcompat = "androidx.appcompat:appcompat:1.7.0"
material = "com.google.android.material:material:1.12.0"
palette = "androidx.palette:palette-ktx:1.0.0"
workmanager = "androidx.work:work-runtime-ktx:2.9.0"
encrypted-preferences = "androidx.security:security-crypto:1.1.0-alpha06" encrypted-preferences = "androidx.security:security-crypto:1.1.0-alpha06"
work-manager = "androidx.work:work-runtime-ktx:2.9.0" # test
junit4 = "junit:junit:4.13.2"
ext-junit = "androidx.test.ext:junit:1.2.1"
ext-runner = "androidx.test:runner:1.6.1"
ext-rules = "androidx.test:rules:1.6.1"
expressocore = "androidx.test.espresso:espresso-core:3.6.1"
[bundles] [bundles]
compose = ["bom", "compose-foundation", "compose-runtime", "compose-animation", compose = ["compose-foundation", "compose-runtime", "compose-animation",
"compose-ui", "compose-ui-tooling", "compose-ui-tooling-preview", "compose-material3"] "compose-ui", "compose-ui-tooling", "compose-ui-tooling-preview", "compose-material3", "compose-activity"]
voyager = ["voyager-navigator", "voyager-screenmodel", "voyager-tab-navigator", "voyager-koin", "voyager-transitions"] voyager = ["voyager-navigator", "voyager-screenmodel", "voyager-tab-navigator", "voyager-koin", "voyager-transitions"]
lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-viewmodel-compose", "lifecycle-viewmodel-savedstate", lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-viewmodel-compose", "lifecycle-viewmodel-savedstate",
"lifecyle-runtime-compose"] "lifecyle-runtime-compose"]
@ -79,3 +98,5 @@ room = ["room-runtime", "room-ktx", "room-paging"]
koin = ["koin-bom", "koin-core", "koin-android", "koin-androidx-compose"] koin = ["koin-bom", "koin-core", "koin-android", "koin-androidx-compose"]
kointest = ["koin-test", "koin-test-junit4"] kointest = ["koin-test", "koin-test-junit4"]
paging = ["paging-runtime", "paging-compose"] paging = ["paging-runtime", "paging-compose"]
test = ["junit4", "ext-junit", "ext-runner", "ext-rules", "expressocore"]
retrofit = ["retrofit", "retrofit-convertermoshi"]