From b70ca57a0bd38cf3be8d4b7abcaf3f2b3149b82e Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Wed, 11 Oct 2023 23:09:52 +0200 Subject: [PATCH] Substitute Groovy 3.x with Groovy 4.x --- build.gradle.kts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b483134..6e361ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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", @@ -19,7 +21,7 @@ val dependencyVersions = listOf( ) val dependencyVersionsByGroup = mapOf( - "org.codehaus.groovy" to "3.0.17", + "org.codehaus.groovy" to groovyVersion, ) subprojects { @@ -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" + ) + } + } + } + } } } } @@ -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" }