diff --git a/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/FormatTask.kt b/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/FormatTask.kt index 6b102b04..8182662d 100644 --- a/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/FormatTask.kt +++ b/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/FormatTask.kt @@ -34,6 +34,7 @@ open class FormatTask @Inject constructor( spec.classpath.setFrom(ktlintClasspath, ruleSetsClasspath) spec.forkOptions { options -> options.maxHeapSize = workerMaxHeapSize.get() + options.jvmArgs = listOf("--add-opens=java.base/java.lang=ALL-UNNAMED") // https://github.com/gradle/gradle/issues/21013 } }