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

paulk-asert 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 f68a20639e test additional user agent workarounds
f68a20639e is described below

commit f68a20639e55aa33d0eef70ad4c0db2f7c1f661d
Author: Paul King <[email protected]>
AuthorDate: Mon May 11 19:44:39 2026 +1000

    test additional user agent workarounds
---
 .../main/groovy/org.apache.groovy-tested.gradle    | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-tested.gradle 
b/build-logic/src/main/groovy/org.apache.groovy-tested.gradle
index 3e65a10a3f..cfce5c234d 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-tested.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-tested.gradle
@@ -84,10 +84,24 @@ tasks.withType(Test).configureEach {
     if (testdb) {
         systemProperty 'groovy.testdb.props', testdb
     }
-    // Forward StrictLocalM2Resolver opt-in to test JVMs. Accepts -P or -D.
-    def strictLocalM2 = findProperty('groovy.grape.strict-localm2') ?: 
System.properties['groovy.grape.strict-localm2']
-    if (strictLocalM2) {
-        systemProperty 'groovy.grape.strict-localm2', strictLocalM2
+    // Forward any groovy.grape.* property set on the Gradle command line (-P 
or -D)
+    // to the test JVM. Lets users override Grape behaviour — strict-localm2, 
debug
+    // flags, future settings — without adding one-off plumbing per flag. 
Project
+    // properties (-P) win over system properties (-D) when both are set, 
matching
+    // Gradle convention.
+    def grapeProps = new LinkedHashMap<String, String>()
+    project.properties.each { k, v ->
+        if (k.toString().startsWith('groovy.grape.') && v != null) {
+            grapeProps[k.toString()] = v.toString()
+        }
+    }
+    System.properties.each { k, v ->
+        if (k.toString().startsWith('groovy.grape.') && v != null) {
+            grapeProps.putIfAbsent(k.toString(), v.toString())
+        }
+    }
+    grapeProps.each { key, value ->
+        systemProperty key, value
     }
     def headless = System.properties['java.awt.headless']
     if (headless == 'true') {

Reply via email to