Skip to content

Commit

Permalink
build: consistently use toolchains
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrMilchmann committed Jul 22, 2022
1 parent 684da9e commit 3d64797
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ java {
}

tasks {
withType<JavaCompile> {
javaCompiler.set(project.javaToolchains.compilerFor(project.java.toolchain))
}

compileJava {
/* Java 8 is the minimum supported version. */
options.release.set(8)
Expand Down Expand Up @@ -203,16 +207,10 @@ tasks {
source = nativeModuleInfoSource
options.sourcepath = files(nativeModuleInfoSource.dir)

classpath = files()
classpath = files(compileJava.get().classpath, jar.get().outputs)

options.release.set(9)

afterEvaluate {
options.compilerArgs.add("--module-path")
options.compilerArgs.add(compileJava.get().classpath.asPath + ";" + jar.get().outputs.files.asPath)
options.compilerArgs.add("--module-version")
options.compilerArgs.add("$version")
}
options.javaModuleVersion.set("$version")
}

create<Jar>("nativeWinJar") {
Expand Down

0 comments on commit 3d64797

Please sign in to comment.