Move Toolchain Config Outside Compile and Test tasks
Issue gh-13811
This commit is contained in:
parent
872de2f20f
commit
6d318914d5
20
build.gradle
20
build.gradle
|
@ -131,25 +131,15 @@ def toolchainVersion() {
|
|||
}
|
||||
|
||||
subprojects {
|
||||
def toolchainVersion = toolchainVersion()
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(toolchainVersion())
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs.add("-parameters")
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(toolchainVersion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(toolchainVersion)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue