Skip to content

Commit

Permalink
Fix ktlint related tasks (#1905)
Browse files Browse the repository at this point in the history
Co-authored-by: Matteo Bigoi <[email protected]>
  • Loading branch information
jjant and crisidev authored Oct 25, 2022
1 parent b4f294c commit 2015331
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ tasks.register<JavaExec>("ktlint") {
classpath = configurations.getByName("ktlint")
main = "com.pinterest.ktlint.Main"
args = listOf("--verbose", "--relative", "--") + lintPaths
// https://github.com/pinterest/ktlint/issues/1195#issuecomment-1009027802
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
}

tasks.register<JavaExec>("ktlintFormat") {
Expand All @@ -64,6 +66,8 @@ tasks.register<JavaExec>("ktlintFormat") {
classpath = configurations.getByName("ktlint")
main = "com.pinterest.ktlint.Main"
args = listOf("--verbose", "--relative", "--format", "--") + lintPaths
// https://github.com/pinterest/ktlint/issues/1195#issuecomment-1009027802
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
}

@Suppress("UnstableApiUsage")
Expand Down

0 comments on commit 2015331

Please sign in to comment.