diff --git a/build.gradle.kts b/build.gradle.kts index 7fefbe867f..5d8b38f366 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -56,6 +56,8 @@ tasks.register("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("ktlintFormat") { @@ -64,6 +66,8 @@ tasks.register("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")