File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,19 @@ allprojects {
3737
3838 apply (plugin = " com.diffplug.spotless" )
3939 configure<SpotlessExtension > {
40+ // https://github.com/diffplug/spotless/tree/main/plugin-gradle#java
4041 java {
4142 removeUnusedImports()
4243 googleJavaFormat()
4344 trimTrailingWhitespace()
4445 endWithNewline()
4546 }
47+ // https://github.com/diffplug/spotless/tree/main/plugin-gradle#kotlin
48+ // Compared to ktlint, it seems ktfmt is better for actual Kotlin code (more deterministic/consistent output).
49+ // Furthermore, spotless is more for formatting than linting.
50+ // However, it has some weird output with Gradle scripts, so using ktlint for that.
4651 kotlin {
47- ktlint ().editorConfigOverride( mapOf ( " ktlint_standard_package-name " to " disabled " ) )
52+ ktfmt ().googleStyle( )
4853 trimTrailingWhitespace()
4954 endWithNewline()
5055 }
@@ -55,7 +60,7 @@ allprojects {
5560 }
5661 }
5762
58- // TODO detekt for kotlin
63+ // TODO Kotlin alternative?
5964 apply (plugin = " checkstyle" )
6065 configure<CheckstyleExtension > {
6166 toolVersion = " 10.12.0"
You can’t perform that action at this time.
0 commit comments