logstash/buildSrc/build.gradle
Andrea Selva 7887972348
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.
2022-08-03 15:32:49 +02:00

24 lines
No EOL
506 B
Groovy

plugins {
id 'groovy'
id 'java'
}
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")
}
test {
useJUnitPlatform()
}