mirror of
https://github.com/elastic/logstash.git
synced 2025-06-27 17:08:55 -04:00
Open java modules for gradle test after 7.5 upgrade (#14413)
Open the access to java.lang and java.util packages in java.base module. With Gradle 7.5 these packages aren't anymore implicitly opened in test tasks. With this commit, those packages are opened for all test tasks, also on the buildSrc.
This commit is contained in:
parent
5354998113
commit
7887972348
2 changed files with 10 additions and 1 deletions
|
@ -90,7 +90,9 @@ allprojects {
|
|||
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
|
||||
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
|
||||
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
|
||||
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
|
||||
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
|
||||
"--add-opens=java.base/java.lang=ALL-UNNAMED",
|
||||
"--add-opens=java.base/java.util=ALL-UNNAMED"
|
||||
]
|
||||
//https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time
|
||||
testLogging {
|
||||
|
|
|
@ -7,6 +7,13 @@ repositories {
|
|||
mavenCentral()
|
||||
}
|
||||
|
||||
if ((JavaVersion.current().getMajorVersion() as int) >= 17) {
|
||||
tasks.withType(Test).configureEach {
|
||||
jvmArgs(["--add-opens=java.base/java.lang=ALL-UNNAMED",
|
||||
"--add-opens=java.base/java.util=ALL-UNNAMED"])
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue