From a1a3aa9a9f601279d181f2fdc094e12099c69c18 Mon Sep 17 00:00:00 2001 From: Scott Stults Date: Thu, 12 Sep 2024 13:16:07 -0400 Subject: [PATCH] Fixes #15 Restrict the range of JVM versions that need security manager flags --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8d83a2a..5c6ae6b 100644 --- a/build.gradle +++ b/build.gradle @@ -145,7 +145,7 @@ githubRelease.doFirst { } tasks.withType(Test).configureEach { task -> - if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) > 0) { + if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) > 0 && JavaVersion.current().compareTo(JavaVersion.VERSION_21) < 0) { def policyFile = file("${projectDir}/src/main/plugin-metadata/plugin-security.policy").absolutePath task.jvmArgs += [ "--add-opens", "java.base/java.lang=ALL-UNNAMED",