Skip to content

Commit

Permalink
Migrate to Gradle's Version Catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Jan 18, 2025
1 parent 0cb6c78 commit 49448d4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
13 changes: 5 additions & 8 deletions client-groovy4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,11 @@ dependencies {
}
}
}
listOf(
"org.apache.groovy:groovy",
"org.apache.groovy:groovy-json"
).forEach {
listOf(libs.bundles.groovy4).forEach {
implementation(it) {
version {
strictly("[4,)")
prefer("4.0.24")
strictly(libs.versions.groovy4Versionrange.get())
prefer(libs.versions.groovy4.get())
}
}
}
Expand All @@ -86,8 +83,8 @@ dependencies {
api("de.gesellix:docker-engine:2025-01-18T20-36-00")
api("de.gesellix:docker-compose:2025-01-18T12-54-00")

implementation("org.apache.groovy:groovy:4.0.24")
implementation("org.apache.groovy:groovy-json:4.0.24")
implementation(libs.groovy4)
implementation(libs.groovy4json)

api(libs.moshi)
implementation("com.google.re2j:re2j:1.8")
Expand Down
13 changes: 5 additions & 8 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,11 @@ dependencies {
}
}
}
listOf(
"org.codehaus.groovy:groovy",
"org.codehaus.groovy:groovy-json"
).forEach {
listOf(libs.bundles.groovy3).forEach {
implementation(it) {
version {
strictly("[3,4)")
prefer("3.0.23")
strictly(libs.versions.groovy3Versionrange.get())
prefer(libs.versions.groovy3.get())
}
}
}
Expand All @@ -86,8 +83,8 @@ dependencies {
api("de.gesellix:docker-engine:2025-01-18T20-36-00")
api("de.gesellix:docker-compose:2025-01-18T12-54-00")

implementation("org.codehaus.groovy:groovy:3.0.23")
implementation("org.codehaus.groovy:groovy-json:3.0.23")
implementation(libs.groovy3)
implementation(libs.groovy3json)

api(libs.moshi)
implementation("com.google.re2j:re2j:1.8")
Expand Down
22 changes: 8 additions & 14 deletions explore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,27 @@ dependencies {
}
}
}
listOf(
"org.codehaus.groovy:groovy",
"org.codehaus.groovy:groovy-json"
).forEach {
listOf(libs.bundles.groovy3).forEach {
implementation(it) {
version {
strictly("[3,4)")
prefer("3.0.23")
strictly(libs.versions.groovy3Versionrange.get())
prefer(libs.versions.groovy3.get())
}
}
}
listOf(
"org.apache.groovy:groovy",
"org.apache.groovy:groovy-json"
).forEach {
listOf(libs.bundles.groovy4).forEach {
implementation(it) {
version {
strictly("[4,)")
prefer("4.0.24")
strictly(libs.versions.groovy4Versionrange.get())
prefer(libs.versions.groovy4.get())
}
}
}
}
// implementation(project(":client"))
implementation(project(":client-groovy4"))
// implementation("org.codehaus.groovy:groovy:[3,4)")
implementation("org.apache.groovy:groovy:4.0.24")
// implementation(libs.groovy3)
implementation(libs.groovy4)
testImplementation("org.apache.commons:commons-compress:1.27.1")

implementation(libs.slf4j)
Expand Down
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[versions]
groovy3 = "3.0.23"
groovy3Versionrange = "[3,4)"
groovy4 = "4.0.24"
groovy4Versionrange = "[4,)"
junitJupiter = "5.11.4"
junitPlatform = "1.11.4"
kotlin = "2.1.0"
Expand All @@ -15,6 +19,10 @@ slf4j = "2.0.16"
slf4jVersionrange = "[1.7,3)"

[libraries]
groovy3 = { module = "org.codehaus.groovy:groovy", version.ref = "groovy3" }
groovy3json = { module = "org.codehaus.groovy:groovy-json", version.ref = "groovy3" }
groovy4 = { module = "org.apache.groovy:groovy", version.ref = "groovy4" }
groovy4json = { module = "org.apache.groovy:groovy-json", version.ref = "groovy4" }
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" }
Expand All @@ -37,6 +45,8 @@ okioJvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" }
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }

[bundles]
groovy3 = ["groovy3", "groovy3json"]
groovy4 = ["groovy4", "groovy4json"]
kotlin = ["kotlin", "kotlinCommon", "kotlinJdk7", "kotlinJdk8", "kotlinReflect", "kotlinScriptingJvm", "kotlinStdlib", "kotlinTest"]
moshi = ["moshi", "moshiKotlin"]
okhttp = ["okhttp", "okhttpMockwebserver"]
Expand Down

0 comments on commit 49448d4

Please sign in to comment.