From a151e9da09ad7fe5d2365699aa4f410012676b8f Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Wed, 13 Mar 2024 00:21:43 +0800 Subject: [PATCH] Grace: add dependencySubstitution to use Groovy 4 --- build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.gradle b/build.gradle index 529821f471..373008e140 100644 --- a/build.gradle +++ b/build.gradle @@ -100,6 +100,17 @@ allprojects { details.useVersion(spockVersion) } } + // Force groovy using 4.0 + dependencySubstitution { + substitute(module("org.codehaus.groovy:groovy")).using(module("org.apache.groovy:groovy:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-ant")).using(module("org.apache.groovy:groovy-ant:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-dateutil")).using(module("org.apache.groovy:groovy-dateutil:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-json")).using(module("org.apache.groovy:groovy-json:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-jmx")).using(module("org.apache.groovy:groovy-jmx:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-sql")).using(module("org.apache.groovy:groovy-sql:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-templates")).using(module("org.apache.groovy:groovy-templates:4.0.10")) + substitute(module("org.codehaus.groovy:groovy-xml")).using(module("org.apache.groovy:groovy-xml:4.0.10")) + } } } }