We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a827001 commit e2fc5b6Copy full SHA for e2fc5b6
1 file changed
build.gradle.kts
@@ -17,7 +17,12 @@ val javacExports = listOf(
17
"jdk.compiler/com.sun.tools.javac.util",
18
)
19
20
+val java8Compiler = javaToolchains.compilerFor {
21
+ languageVersion = JavaLanguageVersion.of(8)
22
+}
23
+
24
dependencies {
25
+ compileOnly(files(java8Compiler.map { it.metadata.installationPath.file("lib/tools.jar") }))
26
testImplementation(libs.junit.jupiter)
27
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
28
}
@@ -30,9 +35,7 @@ java {
30
35
31
36
32
37
tasks.named<JavaCompile>("compileJava") {
33
- javaCompiler = javaToolchains.compilerFor {
34
- languageVersion = JavaLanguageVersion.of(8)
- }
38
+ javaCompiler = java8Compiler
39
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
40
targetCompatibility = JavaVersion.VERSION_1_8.toString()
41
0 commit comments