[#515] Run ktlint under more recent JVMs
This commit is contained in:
parent
6a3549e125
commit
6c79dc34a3
|
@ -24,11 +24,8 @@ tasks {
|
|||
}
|
||||
|
||||
register("ktlintFormat", org.gradle.api.tasks.JavaExec::class) {
|
||||
// Workaround for ktlint bug; force to run on an older JDK
|
||||
// https://github.com/pinterest/ktlint/issues/1274
|
||||
javaLauncher.set(javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_11.majorVersion))
|
||||
})
|
||||
// https://github.com/pinterest/ktlint/issues/1195#issuecomment-1009027802
|
||||
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
|
||||
|
||||
description = "Apply code style formatting with ktlint"
|
||||
classpath = ktlint
|
||||
|
|
Loading…
Reference in New Issue