Skip to content

Commit 1476818

Browse files
authored
Merge pull request #50 from marklogic/feature/java17
Added support for running tests on Java 17
2 parents 4d09e57 + 97eff5e commit 1476818

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ test {
4343
environment "mlHost", mlHost
4444
}
4545

46+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
47+
test {
48+
// See https://stackoverflow.com/questions/72724816/running-unit-tests-with-spark-3-3-0-on-java-17-fails-with-illegalaccesserror-cl
49+
// for an explanation of why these are needed when running the tests on Java 17.
50+
jvmArgs = [
51+
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
52+
'--add-opens=java.base/sun.util.calendar=ALL-UNNAMED'
53+
]
54+
}
55+
}
56+
4657
shadowJar {
4758
// "all" is the default; no need for that in the connector filename.
4859
archiveClassifier.set("")

0 commit comments

Comments
 (0)