diff --git a/build.gradle b/build.gradle index 75b4566a7bc..7accde34463 100644 --- a/build.gradle +++ b/build.gradle @@ -346,6 +346,15 @@ gradle.projectsEvaluated { if (tasks.findByPath('test') != null && tasks.findByPath('integTest') != null) { integTest.mustRunAfter test } + + project.tasks.withType(Test) { task -> + if (task != null) { + if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_17) { + task.jvmArgs += ["-Djava.security.manager=allow"] + } + } + } + configurations.matching { it.canBeResolved }.all { Configuration configuration -> dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep -> Project upstreamProject = dep.dependencyProject diff --git a/gradle.properties b/gradle.properties index 6c48fc7c5f9..0974eb6d6b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ systemProp.org.gradle.warning.mode=fail systemProp.jdk.tls.client.protocols=TLSv1.2 # jvm args for faster test execution by default -systemProp.tests.jvm.argline=-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m -Djava.security.manager=allow +systemProp.tests.jvm.argline=-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m