Skip to content

Commit 19d0e7d

Browse files
committed
update build
1 parent 8574140 commit 19d0e7d

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ java {
6969
withSourcesJar ()
7070
}
7171

72+
kotlin {
73+
jvmToolchain(libs.versions.build.jdk.get() as Integer)
74+
}
75+
7276
compileKotlin.dependsOn "generateVersion"
7377

7478
compileTestGroovy {
@@ -144,7 +148,20 @@ tasks.named("dependencyUpdates").configure {
144148
}
145149
}
146150

147-
tasks.withType(Test) {
151+
tasks.withType(Test).configureEach {
152+
jvmArgs(
153+
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
154+
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
155+
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
156+
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
157+
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
158+
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
159+
)
160+
161+
javaLauncher.set(javaToolchains.launcherFor {
162+
languageVersion.set(JavaLanguageVersion.of(libs.versions.test.jdk.get()))
163+
})
164+
148165
finalizedBy jacocoTestReport
149166
}
150167

0 commit comments

Comments
 (0)