We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cb9497 commit bd3020bCopy full SHA for bd3020b
1 file changed
subprojects/groovy-ant/build.gradle
@@ -16,6 +16,8 @@
16
* specific language governing permissions and limitations
17
* under the License.
18
*/
19
+import org.apache.groovy.gradle.TargetJavaHomeSupport
20
+
21
plugins {
22
id 'org.apache.groovy-library'
23
}
@@ -41,7 +43,9 @@ dependencies {
41
43
42
44
45
tasks.withType(Test).configureEach {
- if (JavaVersion.current() < JavaVersion.VERSION_24) {
46
+ Integer feature = TargetJavaHomeSupport.featureVersionFromReleaseFile(TargetJavaHomeSupport.targetJavaHome(project))
47
+ boolean testJdkPre24 = feature != null ? feature < 24 : JavaVersion.current() < JavaVersion.VERSION_24
48
+ if (testJdkPre24) {
49
// Setting isn't allowed for Java 24+ but hushes security manager warnings from Ant for JDK17-23
50
jvmArgs '-Djava.security.manager=allow'
51
0 commit comments