diff --git a/gradle/any/properties.gradle b/gradle/any/properties.gradle index a132de0eea..d3d56b1558 100644 --- a/gradle/any/properties.gradle +++ b/gradle/any/properties.gradle @@ -52,3 +52,17 @@ ext { getPropertyOrFailBuild = this.&getPropertyOrFailBuild addFilteredSysProps = this.&addFilteredSysProps } + +ext { + jvmArguments = [ + '--add-exports', 'java.base/jdk.internal.ref=ALL-UNNAMED', + '--add-exports', 'java.base/sun.nio.ch=ALL-UNNAMED', + '--add-exports', 'jdk.unsupported/sun.misc=ALL-UNNAMED', + '--add-exports', 'jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED', + '--add-opens', 'jdk.compiler/com.sun.tools.javac=ALL-UNNAMED', + '--add-opens', 'java.base/java.lang=ALL-UNNAMED', + '--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED', + '--add-opens', 'java.base/java.io=ALL-UNNAMED', + '--add-opens', 'java.base/java.util=ALL-UNNAMED', + ] +} diff --git a/tdcommon/build.gradle b/tdcommon/build.gradle index d73d713a8c..c8ea803b74 100644 --- a/tdcommon/build.gradle +++ b/tdcommon/build.gradle @@ -48,3 +48,7 @@ spotless { tasks.named('sourceJar').configure { dependsOn('generateProto') } + +test { + jvmArgs = jvmArguments +} diff --git a/tds/build.gradle b/tds/build.gradle index 1675fc922d..68c111ccc9 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -254,10 +254,14 @@ import org.akhikhl.gretty.AppAfterIntegrationTestTask import java.nio.file.Paths +test { + jvmArgs = jvmArguments +} + gretty { httpPort = 8081 contextPath = '/thredds' - jvmArgs = ['--add-exports', 'java.base/jdk.internal.ref=ALL-UNNAMED'] + jvmArgs = jvmArguments } def testInfomation = [[name: 'freshInstallTest',