Skip to content

Commit

Permalink
build(gradle): Fix running OrtConfigurationTest on Windows
Browse files Browse the repository at this point in the history
This prevents errors like

    Unable to make field private static final java.util.Map
    java.lang.ProcessEnvironment.theCaseInsensitiveEnvironment accessible:
    module java.base does not "opens java.lang" to unnamed module @673fdbc

when running `OrtConfigurationTest` on Windows with Temurin JDK 21.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Dec 12, 2024
1 parent 709053a commit 7abe559
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ tasks.withType<Test>().configureEach {
// See https://kotest.io/docs/next/extensions/system_extensions.html#system-environment.
jvmArgs(
"--add-opens", "java.base/java.io=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED"
)
Expand Down

0 comments on commit 7abe559

Please sign in to comment.