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 bd3020b9d4 fix build for JDK24+ (take 2, test our explicit target
version)
bd3020b9d4 is described below
commit bd3020b9d4686e4fbb536a026d02ba0cdd50e5d5
Author: Paul King <[email protected]>
AuthorDate: Sat Apr 4 05:19:59 2026 +1000
fix build for JDK24+ (take 2, test our explicit target version)
---
subprojects/groovy-ant/build.gradle | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/subprojects/groovy-ant/build.gradle
b/subprojects/groovy-ant/build.gradle
index 52257844d4..a3b2605d53 100644
--- a/subprojects/groovy-ant/build.gradle
+++ b/subprojects/groovy-ant/build.gradle
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+import org.apache.groovy.gradle.TargetJavaHomeSupport
+
plugins {
id 'org.apache.groovy-library'
}
@@ -41,7 +43,9 @@ dependencies {
}
tasks.withType(Test).configureEach {
- if (JavaVersion.current() < JavaVersion.VERSION_24) {
+ Integer feature =
TargetJavaHomeSupport.featureVersionFromReleaseFile(TargetJavaHomeSupport.targetJavaHome(project))
+ boolean testJdkPre24 = feature != null ? feature < 24 :
JavaVersion.current() < JavaVersion.VERSION_24
+ if (testJdkPre24) {
// Setting isn't allowed for Java 24+ but hushes security manager
warnings from Ant for JDK17-23
jvmArgs '-Djava.security.manager=allow'
}