Skip to content

Commit

Permalink
Substitute Groovy 3.x with Groovy 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Oct 11, 2023
1 parent 9a0cf2a commit 1ceeaea
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}

val groovyVersion = "4.0.15"

val dependencyVersions = listOf(
"com.squareup.okio:okio:3.6.0",
"com.squareup.okio:okio-jvm:3.6.0",
Expand All @@ -19,7 +21,7 @@ val dependencyVersions = listOf(
)

val dependencyVersionsByGroup = mapOf(
"org.codehaus.groovy" to "3.0.17",
"org.apache.groovy" to groovyVersion,
)

subprojects {
Expand All @@ -33,6 +35,19 @@ subprojects {
useVersion(forcedVersion)
}
}
dependencySubstitution {
all {
requested.let {
if (it is ModuleComponentSelector && it.group == "org.codehaus.groovy") {
logger.lifecycle("substituting $it with 'org.apache.groovy:*:${groovyVersion}'")
useTarget(
"org.apache.groovy:${it.module}:${groovyVersion}",
"Changed Maven coordinates since Groovy 4"
)
}
}
}
}
}
}
}
Expand All @@ -57,7 +72,7 @@ nexusPublishing {

// https://gradle.org/release-checksums/
tasks.wrapper {
gradleVersion = "8.3"
gradleVersion = "8.4"
distributionType = Wrapper.DistributionType.BIN
distributionSha256Sum = "591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225"
distributionSha256Sum = "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae"
}

0 comments on commit 1ceeaea

Please sign in to comment.