|
@@ -7,33 +7,72 @@ plugins {
|
|
|
spotless {
|
|
|
java {
|
|
|
googleJavaFormat()
|
|
|
- licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public|// Includes work from:)")
|
|
|
+ licenseHeaderFile(
|
|
|
+ rootProject.file("buildscripts/spotless.license.java"),
|
|
|
+ "(package|import|public|// Includes work from:)"
|
|
|
+ )
|
|
|
toggleOffOn()
|
|
|
target("src/**/*.java")
|
|
|
}
|
|
|
plugins.withId("groovy") {
|
|
|
groovy {
|
|
|
- licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class)")
|
|
|
+ licenseHeaderFile(
|
|
|
+ rootProject.file("buildscripts/spotless.license.java"),
|
|
|
+ "(package|import|class)"
|
|
|
+ )
|
|
|
endWithNewline()
|
|
|
}
|
|
|
}
|
|
|
plugins.withId("scala") {
|
|
|
scala {
|
|
|
scalafmt()
|
|
|
- licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)")
|
|
|
+ licenseHeaderFile(
|
|
|
+ rootProject.file("buildscripts/spotless.license.java"),
|
|
|
+ "(package|import|public)"
|
|
|
+ )
|
|
|
target("src/**/*.scala")
|
|
|
}
|
|
|
}
|
|
|
plugins.withId("org.jetbrains.kotlin.jvm") {
|
|
|
kotlin {
|
|
|
// not sure why it's not using the indent settings from .editorconfig
|
|
|
- ktlint().editorConfigOverride(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports,package-name"))
|
|
|
- licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)")
|
|
|
+ ktlint().editorConfigOverride(
|
|
|
+ mapOf(
|
|
|
+ "indent_size" to "2",
|
|
|
+ "continuation_indent_size" to "2",
|
|
|
+ "max_line_length" to "160",
|
|
|
+ "ktlint_standard_no-wildcard-imports" to "disabled",
|
|
|
+ "ktlint_standard_package-name" to "disabled",
|
|
|
+ // ktlint does not break up long lines, it just fails on them
|
|
|
+ "ktlint_standard_max-line-length" to "disabled",
|
|
|
+ // ktlint makes it *very* hard to locate where this actually happened
|
|
|
+ "ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
|
|
+ // also very hard to find out where this happens
|
|
|
+ "ktlint_standard_wrapping" to "disabled"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ licenseHeaderFile(
|
|
|
+ rootProject.file("buildscripts/spotless.license.java"),
|
|
|
+ "(package|import|class|// Includes work from:)"
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
kotlinGradle {
|
|
|
// not sure why it's not using the indent settings from .editorconfig
|
|
|
- ktlint().editorConfigOverride(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
|
|
|
+ ktlint().editorConfigOverride(
|
|
|
+ mapOf(
|
|
|
+ "indent_size" to "2",
|
|
|
+ "continuation_indent_size" to "2",
|
|
|
+ "max_line_length" to "160",
|
|
|
+ "ktlint_standard_no-wildcard-imports" to "disabled",
|
|
|
+ // ktlint does not break up long lines, it just fails on them
|
|
|
+ "ktlint_standard_max-line-length" to "disabled",
|
|
|
+ // ktlint makes it *very* hard to locate where this actually happened
|
|
|
+ "ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
|
|
+ // also very hard to find out where this happens
|
|
|
+ "ktlint_standard_wrapping" to "disabled"
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
|