Skip to content

Commit 0901aac

Browse files
authored
1 parent ed92b01 commit 0901aac

File tree

3 files changed

+69
-26
lines changed

3 files changed

+69
-26
lines changed

api-client/build.gradle.kts

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,24 @@ java {
1919

2020
dependencies {
2121
constraints {
22-
implementation("com.squareup.moshi:moshi") {
22+
implementation(libs.moshi) {
2323
version {
24-
strictly("[1.12.0,2)")
25-
prefer("1.15.2")
24+
strictly(libs.versions.moshiVersionrange.get())
25+
prefer(libs.versions.moshi.get())
2626
}
2727
}
28-
listOf(
29-
"com.squareup.okio:okio",
30-
"com.squareup.okio:okio-jvm"
31-
).forEach {
28+
listOf(libs.bundles.okio).forEach {
3229
implementation(it) {
3330
version {
34-
strictly("[3,4)")
35-
prefer("3.9.1")
31+
strictly(libs.versions.okioVersionrange.get())
32+
prefer(libs.versions.okio.get())
3633
}
3734
}
3835
}
39-
implementation("com.squareup.okhttp3:okhttp") {
36+
implementation(libs.okhttp) {
4037
version {
41-
strictly("[4.9,5)")
42-
prefer("4.12.0")
38+
strictly(libs.versions.okhttpVersionrange.get())
39+
prefer(libs.versions.okhttp.get())
4340
}
4441
}
4542
implementation("de.gesellix:docker-remote-api-model-1-41") {
@@ -57,31 +54,31 @@ dependencies {
5754
strictly("[2024-01-01T01-01-01,)")
5855
}
5956
}
60-
implementation("org.slf4j:slf4j-api") {
57+
implementation(libs.slf4j) {
6158
version {
62-
strictly("[1.7,3)")
63-
prefer("2.0.16")
59+
strictly(libs.versions.slf4jVersionrange.get())
60+
prefer(libs.versions.slf4j.get())
6461
}
6562
}
6663
}
67-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0")
64+
implementation(libs.kotlinJdk8)
6865
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
69-
implementation("com.squareup.moshi:moshi:1.15.2")
70-
implementation("com.squareup.okhttp3:okhttp:4.12.0")
66+
implementation(libs.moshi)
67+
implementation(libs.okhttp)
7168
// implementation("com.squareup.okhttp3:logging-interceptor:[4.9,5)!!4.11.0")
7269
implementation("de.gesellix:docker-remote-api-model-1-41:2024-11-28T22-05-00")
7370
implementation("de.gesellix:docker-engine:2024-11-28T22-05-00")
7471
implementation("de.gesellix:docker-filesocket:2025-01-18T12-53-00")
7572

76-
implementation("org.slf4j:slf4j-api:2.0.16")
77-
testImplementation("ch.qos.logback:logback-classic:[1.2,2)!!1.3.14")
73+
implementation(libs.slf4j)
74+
testImplementation("ch.qos.logback:logback-classic:${libs.versions.logbackVersionrange.get()}!!${libs.versions.logback.get()}")
7875

7976
testImplementation("io.kotest:kotest-runner-junit5-jvm:5.9.1")
80-
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
81-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
77+
testImplementation(libs.junitJupiterApi)
78+
testRuntimeOnly(libs.junitJupiterEngine)
8279
testRuntimeOnly("cglib:cglib-nodep:3.3.0")
83-
testImplementation("org.junit.platform:junit-platform-launcher:1.11.4")
84-
testImplementation("org.junit.platform:junit-platform-commons:1.11.4")
80+
testImplementation(libs.junitPlatformLauncher)
81+
testImplementation(libs.junitPlatformCommons)
8582

8683
testImplementation("org.apache.commons:commons-compress:1.27.1")
8784
testImplementation("de.gesellix:testutil:[2024-01-01T01-01-01,)")

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
id("net.ossindex.audit") version "0.4.11"
1010
id("io.freefair.maven-central.validate-poms") version "8.11"
1111
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
12-
id("org.jetbrains.kotlin.jvm") version "2.1.0" apply false
12+
alias(libs.plugins.kotlinJvm) apply false
1313
}
1414

1515
val dependencyVersions = listOf(
@@ -34,7 +34,7 @@ val dependencyVersions = listOf(
3434
)
3535

3636
val dependencyVersionsByGroup = mapOf(
37-
"org.junit.platform" to "1.11.0",
37+
"org.junit.platform" to libs.versions.junitPlatform.get(),
3838
)
3939

4040
subprojects {

gradle/libs.versions.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[versions]
2+
junitJupiter = "5.11.4"
3+
junitPlatform = "1.11.0"
4+
kotlin = "2.1.0"
5+
kotlinVersionrange = "[1.6,3)"
6+
logback = "1.3.15"
7+
logbackVersionrange = "[1.2,2)"
8+
moshi = "1.15.2"
9+
moshiVersionrange = "[1.12.0,2)"
10+
okhttp = "4.12.0"
11+
okhttpVersionrange = "[4,5)"
12+
okio = "3.10.2"
13+
okioVersionrange = "[3,4)"
14+
slf4j = "2.0.16"
15+
slf4jVersionrange = "[1.7,3)"
16+
17+
[libraries]
18+
junitJupiterApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiter" }
19+
junitJupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junitJupiter" }
20+
junitPlatformCommons = { module = "org.junit.platform:junit-platform-commons", version.ref = "junitPlatform" }
21+
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatform" }
22+
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
23+
kotlinCommon = { module = "org.jetbrains.kotlin:kotlin-stdlib-common", version.ref = "kotlin" }
24+
kotlinJdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" }
25+
kotlinJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
26+
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
27+
kotlinScriptingJvm = { module = "org.jetbrains.kotlin:kotlin-scripting-jvm", version.ref = "kotlin" }
28+
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
29+
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
30+
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
31+
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
32+
moshiKotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
33+
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
34+
okhttpMockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
35+
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
36+
okioJvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" }
37+
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
38+
39+
[bundles]
40+
kotlin = ["kotlin", "kotlinCommon", "kotlinJdk7", "kotlinJdk8", "kotlinReflect", "kotlinScriptingJvm", "kotlinStdlib", "kotlinTest"]
41+
moshi = ["moshi", "moshiKotlin"]
42+
okhttp = ["okhttp", "okhttpMockwebserver"]
43+
okio = ["okio", "okioJvm"]
44+
45+
[plugins]
46+
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

0 commit comments

Comments
 (0)