This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 149dd803f7 minor refactor: remove gradle warning: The automatic 
loading of test framework implementation dependencies has been deprecated.
149dd803f7 is described below

commit 149dd803f7e515d5d06fe55bf1078943890d53d3
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Dec 4 18:25:17 2024 +1000

    minor refactor: remove gradle warning: The automatic loading of test 
framework implementation dependencies has been deprecated.
---
 .../src/main/groovy/org.apache.groovy-performance.gradle      |  3 +++
 subprojects/groovy-contracts/build.gradle                     |  3 +++
 subprojects/groovy-nio/build.gradle                           |  3 +++
 subprojects/groovy-templates/build.gradle                     |  5 ++++-
 subprojects/groovy-xml/build.gradle                           | 11 ++++++++---
 5 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-performance.gradle 
b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
index 10954a444f..9657c3c587 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
@@ -44,6 +44,9 @@ repositories {
 dependencies {
     jmh project(":")
     testImplementation project(":")
+    
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${versions.junit5Platform}")
 {
+        exclude(group: 'org.apiguardian', module: 'apiguardian-api')
+    }
     stats "org.apache.commons:commons-math3:${versions.commonsMath3}"
 }
 
diff --git a/subprojects/groovy-contracts/build.gradle 
b/subprojects/groovy-contracts/build.gradle
index 54e91e9b05..8c221635a1 100644
--- a/subprojects/groovy-contracts/build.gradle
+++ b/subprojects/groovy-contracts/build.gradle
@@ -29,6 +29,9 @@ dependencies {
         exclude group: 'org.codehaus.groovy'
     }
     
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${versions.junit5}")
+    
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${versions.junit5Platform}")
 {
+        exclude(group: 'org.apiguardian', module: 'apiguardian-api')
+    }
 }
 
 tasks.named('test') {
diff --git a/subprojects/groovy-nio/build.gradle 
b/subprojects/groovy-nio/build.gradle
index dadbb719ee..1a00650fdb 100644
--- a/subprojects/groovy-nio/build.gradle
+++ b/subprojects/groovy-nio/build.gradle
@@ -27,6 +27,9 @@ dependencies {
     testImplementation("org.spockframework:spock-core:${versions.spock}") {
         exclude group: 'org.codehaus.groovy'
     }
+    
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${versions.junit5Platform}")
 {
+        exclude(group: 'org.apiguardian', module: 'apiguardian-api')
+    }
 }
 
 groovyLibrary {
diff --git a/subprojects/groovy-templates/build.gradle 
b/subprojects/groovy-templates/build.gradle
index 0b7ec93e70..d74f8e8e25 100644
--- a/subprojects/groovy-templates/build.gradle
+++ b/subprojects/groovy-templates/build.gradle
@@ -30,6 +30,9 @@ dependencies {
     
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${versions.junit5}") {
         because 'for JUnit 3/4 tests as well as JUnit 5'
     }
+    
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${versions.junit5Platform}")
 {
+        exclude(group: 'org.apiguardian', module: 'apiguardian-api')
+    }
 }
 
 tasks.named('test') {
@@ -44,4 +47,4 @@ tasks.named('rat') {
             'src/test/resources/includes/hello-escaped.txt',
             'src/test/resources/includes/hello.html'
     ]
-}
\ No newline at end of file
+}
diff --git a/subprojects/groovy-xml/build.gradle 
b/subprojects/groovy-xml/build.gradle
index a4dc0fb93e..be3daf7eaf 100644
--- a/subprojects/groovy-xml/build.gradle
+++ b/subprojects/groovy-xml/build.gradle
@@ -30,13 +30,18 @@ dependencies {
     }
 
     testRuntimeOnly projects.groovyAnt // for JavadocAssertionTests
-    testRuntimeOnly("org.apache.ivy:ivy:${versions.ivy}") {
-        transitive = false
-        because 'JavadocAssertionTests use @Grab'
+    testRuntimeOnly(project(':')) {
+        because 'Tests are using Grapes'
+        capabilities {
+            requireCapability 'org.apache.groovy:groovy-grapes'
+        }
     }
     
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${versions.junit5}") {
         because 'for JUnit 3/4 tests as well as JUnit 5'
     }
+    
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${versions.junit5Platform}")
 {
+        exclude(group: 'org.apiguardian', module: 'apiguardian-api')
+    }
 }
 
 plugins.withId('eclipse') {

Reply via email to