gradle-scripts icon indicating copy to clipboard operation
gradle-scripts copied to clipboard

Fix `jvmTarget` & `ktlint` config in `kotlin` flag preset

Open ks-yim opened this issue 2 years ago • 0 comments

Motivation:

  • Currently, compiling kotlin source with line-gradle-scripts emits the following warning if javaTargetCompatibility is >= 11. Maybe we should make this option pick up the value from javaTargetCompatibility property.
    > Task :come:module:compileKotlin
    'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
    
  • ktlint exclude("/gen-src/") filter condition doesn't work for dynamically attached source and it should be modified to...:
    filter {
        exclude { it.file.path.contains("gen-src/")
    }
    
    • See: https://github.com/JLLeitschuh/ktlint-gradle#faq
  • line-gradle-scripts is currently using a old ktlint version(0.36.0) due to https://github.com/pinterest/ktlint/issues/764, but it seems the issue has been resolved in a newer linter version.

ks-yim avatar Oct 18 '22 03:10 ks-yim