Faster spotless
MODIFY
build.gradle
build.gradle
@@ -80,8 +80,7 @@ spotless {
// this formatting is applied at the root level, as some of these files are not in a submodules
// and would be missed otherwise
format 'misc', {
- target '**/.gitignore', '**/*.md', '**/*.sh'
- targetExclude 'smoke-tests/**/build/**'
+ target '.gitignore', '*.md', 'docs/**/*.md'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()

MODIFY
gradle/spotless.gradle
gradle/spotless.gradle
@@ -19,6 +19,13 @@ spotless {
ktlint().userData(['indent_size': '2', 'continuation_indent_size': '2'])
licenseHeaderFile rootProject.file('gradle/enforcement/spotless.license.java'), '(package|import|public)'
}
+ format 'misc', {
+ // not using '**/...' to help keep spotless fast
+ target '.gitignore', '*.md', 'src/**/.md', '*.sh'
+ indentWithSpaces()
+ trimTrailingWhitespace()
+ endWithNewline()
+ }
}
task formatCode(dependsOn: ['spotlessApply'])

Faster spotless (#844)