Fix ktlint formatter after upgrade to Java 17
See https://github.com/pinterest/ktlint/issues/1195 and https://github.com/ScoopInstaller/Extras/issues/10313. Note that although this should have been fixed in the latest version of ktlint (we are using an old one), the fix doesn't seems to have worked for me.
This commit is contained in:
parent
da30e539df
commit
8519897089
1 changed files with 2 additions and 0 deletions
|
@ -164,6 +164,7 @@ task runKtlint(type: JavaExec) {
|
|||
getMainClass().set("com.pinterest.ktlint.Main")
|
||||
classpath = configurations.ktlint
|
||||
args "src/**/*.kt"
|
||||
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
|
||||
}
|
||||
|
||||
task formatKtlint(type: JavaExec) {
|
||||
|
@ -172,6 +173,7 @@ task formatKtlint(type: JavaExec) {
|
|||
getMainClass().set("com.pinterest.ktlint.Main")
|
||||
classpath = configurations.ktlint
|
||||
args "-F", "src/**/*.kt"
|
||||
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
|
|
Loading…
Reference in a new issue