diff --git a/build.gradle b/build.gradle index 47e621ab..0735ed15 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,9 @@ plugins { - id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false + alias(libs.plugins.kotlin) apply false + alias(libs.plugins.ksp) apply false id "org.jlleitschuh.gradle.ktlint" version "11.3.1" id "io.github.gradle-nexus.publish-plugin" version "1.3.0" id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10" - id "com.google.devtools.ksp" version "1.8.10-1.0.9" apply false } ext { @@ -13,11 +13,8 @@ ext { jspoon = "1.3.2" jsoup = "1.15.4" - okhttp3 = "4.10.0" - retrofit = "2.9.0" slf4j = "2.0.7" moshi = "1.13.0" - coroutines = "1.6.4" } version = PUBLISH_VERSION @@ -51,7 +48,8 @@ allprojects { dependencies { implementation "org.slf4j:slf4j-api:$slf4j" testImplementation "org.slf4j:slf4j-simple:$slf4j" - implementation platform("com.squareup.okhttp3:okhttp-bom:$okhttp3") + + implementation platform(libs.okhttp.bom) } java { @@ -131,15 +129,15 @@ subprojects { } dependencies { - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines" + implementation libs.coroutines.core implementation "com.squareup.okhttp3:logging-interceptor" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0" testImplementation "junit:junit:4.13.2" testImplementation "com.squareup.okhttp3:mockwebserver" - testImplementation "com.squareup.retrofit2:retrofit-mock:$retrofit" - testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines" + testImplementation libs.retrofit.mock + testImplementation libs.coroutines.test } jacocoTestReport { diff --git a/sdk-mobile/build.gradle b/sdk-mobile/build.gradle index 961a9e71..a1c14482 100644 --- a/sdk-mobile/build.gradle +++ b/sdk-mobile/build.gradle @@ -9,9 +9,9 @@ dependencies { implementation "com.brsanthu:migbase64:2.2" - implementation "com.squareup.retrofit2:retrofit:$retrofit" - implementation "com.squareup.retrofit2:converter-moshi:$retrofit" - implementation "com.squareup.retrofit2:converter-scalars:$retrofit" + implementation libs.retrofit.core + implementation libs.retrofit.moshi + implementation libs.retrofit.scalars def moshi = "1.14.0" implementation "com.squareup.moshi:moshi:$moshi" diff --git a/sdk-scrapper/build.gradle b/sdk-scrapper/build.gradle index ed24f0a3..49ac87a7 100644 --- a/sdk-scrapper/build.gradle +++ b/sdk-scrapper/build.gradle @@ -8,8 +8,8 @@ dependencies { implementation "org.jsoup:jsoup:$jsoup" testImplementation "com.squareup.okhttp3:mockwebserver" - implementation "com.squareup.retrofit2:retrofit:$retrofit" - implementation "com.squareup.retrofit2:converter-scalars:$retrofit" + implementation libs.retrofit.core + implementation libs.retrofit.scalars implementation "pl.droidsonroids.retrofit2:converter-jspoon:$jspoon" implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0" diff --git a/settings.gradle b/settings.gradle index 296b67f6..88080a69 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,30 @@ include 'sdk-mobile' include 'sdk-scrapper' include 'sdk' + +dependencyResolutionManagement { + versionCatalogs { + libs { + def kotlin = '1.8.10' + + version('sdk', '1.9.3-SNAPSHOT') + version('kotlin', kotlin) + version('coroutines', '1.6.4') + version('retrofit', '2.9.0') + version('ksp', "${kotlin}-1.0.9") + + plugin('kotlin', 'org.jetbrains.kotlin.jvm').versionRef('kotlin') + plugin('ksp', 'com.google.devtools.ksp').versionRef('ksp') + + library('coroutines-core', 'org.jetbrains.kotlinx', 'kotlinx-coroutines-core').versionRef('coroutines') + library('coroutines-test', 'org.jetbrains.kotlinx', 'kotlinx-coroutines-test').versionRef('coroutines') + + library('retrofit-core', 'com.squareup.retrofit2', 'retrofit').versionRef('retrofit') + library('retrofit-scalars', 'com.squareup.retrofit2', 'converter-scalars').versionRef('retrofit') + library('retrofit-moshi', 'com.squareup.retrofit2', 'converter-moshi').versionRef('retrofit') + library('retrofit-mock', 'com.squareup.retrofit2', 'retrofit-mock').versionRef('retrofit') + + library('okhttp-bom', 'com.squareup.okhttp3:okhttp-bom:4.10.0') + } + } +}