Skip to content

Migrate to Gradle's Version Catalogs #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions api-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,24 @@ java {

dependencies {
constraints {
implementation("com.squareup.moshi:moshi") {
implementation(libs.moshi) {
version {
strictly("[1.12.0,2)")
prefer("1.15.2")
strictly(libs.versions.moshiVersionrange.get())
prefer(libs.versions.moshi.get())
}
}
listOf(
"com.squareup.okio:okio",
"com.squareup.okio:okio-jvm"
).forEach {
listOf(libs.bundles.okio).forEach {
implementation(it) {
version {
strictly("[3,4)")
prefer("3.9.1")
strictly(libs.versions.okioVersionrange.get())
prefer(libs.versions.okio.get())
}
}
}
implementation("com.squareup.okhttp3:okhttp") {
implementation(libs.okhttp) {
version {
strictly("[4.9,5)")
prefer("4.12.0")
strictly(libs.versions.okhttpVersionrange.get())
prefer(libs.versions.okhttp.get())
}
}
implementation("de.gesellix:docker-remote-api-model-1-41") {
Expand All @@ -57,31 +54,31 @@ dependencies {
strictly("[2024-01-01T01-01-01,)")
}
}
implementation("org.slf4j:slf4j-api") {
implementation(libs.slf4j) {
version {
strictly("[1.7,3)")
prefer("2.0.16")
strictly(libs.versions.slf4jVersionrange.get())
prefer(libs.versions.slf4j.get())
}
}
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0")
implementation(libs.kotlinJdk8)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
implementation("com.squareup.moshi:moshi:1.15.2")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation(libs.moshi)
implementation(libs.okhttp)
// implementation("com.squareup.okhttp3:logging-interceptor:[4.9,5)!!4.11.0")
implementation("de.gesellix:docker-remote-api-model-1-41:2024-11-28T22-05-00")
implementation("de.gesellix:docker-engine:2024-11-28T22-05-00")
implementation("de.gesellix:docker-filesocket:2025-01-18T12-53-00")

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

testImplementation("io.kotest:kotest-runner-junit5-jvm:5.9.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
testImplementation(libs.junitJupiterApi)
testRuntimeOnly(libs.junitJupiterEngine)
testRuntimeOnly("cglib:cglib-nodep:3.3.0")
testImplementation("org.junit.platform:junit-platform-launcher:1.11.4")
testImplementation("org.junit.platform:junit-platform-commons:1.11.4")
testImplementation(libs.junitPlatformLauncher)
testImplementation(libs.junitPlatformCommons)

testImplementation("org.apache.commons:commons-compress:1.27.1")
testImplementation("de.gesellix:testutil:[2024-01-01T01-01-01,)")
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id("net.ossindex.audit") version "0.4.11"
id("io.freefair.maven-central.validate-poms") version "8.11"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.jetbrains.kotlin.jvm") version "2.1.0" apply false
alias(libs.plugins.kotlinJvm) apply false
}

val dependencyVersions = listOf(
Expand All @@ -34,7 +34,7 @@ val dependencyVersions = listOf(
)

val dependencyVersionsByGroup = mapOf(
"org.junit.platform" to "1.11.0",
"org.junit.platform" to libs.versions.junitPlatform.get(),
)

subprojects {
Expand Down
46 changes: 46 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[versions]
junitJupiter = "5.11.4"
junitPlatform = "1.11.0"
kotlin = "2.1.0"
kotlinVersionrange = "[1.6,3)"
logback = "1.3.15"
logbackVersionrange = "[1.2,2)"
moshi = "1.15.2"
moshiVersionrange = "[1.12.0,2)"
okhttp = "4.12.0"
okhttpVersionrange = "[4,5)"
okio = "3.10.2"
okioVersionrange = "[3,4)"
slf4j = "2.0.16"
slf4jVersionrange = "[1.7,3)"

[libraries]
junitJupiterApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiter" }
junitJupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junitJupiter" }
junitPlatformCommons = { module = "org.junit.platform:junit-platform-commons", version.ref = "junitPlatform" }
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatform" }
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinCommon = { module = "org.jetbrains.kotlin:kotlin-stdlib-common", version.ref = "kotlin" }
kotlinJdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" }
kotlinJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinScriptingJvm = { module = "org.jetbrains.kotlin:kotlin-scripting-jvm", version.ref = "kotlin" }
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
moshiKotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttpMockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
okioJvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" }
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }

[bundles]
kotlin = ["kotlin", "kotlinCommon", "kotlinJdk7", "kotlinJdk8", "kotlinReflect", "kotlinScriptingJvm", "kotlinStdlib", "kotlinTest"]
moshi = ["moshi", "moshiKotlin"]
okhttp = ["okhttp", "okhttpMockwebserver"]
okio = ["okio", "okioJvm"]

[plugins]
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
Loading