Add Spotless

This commit is contained in:
Hemanth S 2020-10-06 14:16:04 +05:30
parent 2af13a4e6c
commit defcd86152
286 changed files with 15604 additions and 13757 deletions

30
spotless.gradle Normal file
View file

@ -0,0 +1,30 @@
apply plugin: "com.diffplug.gradle.spotless"
spotless {
java {
target "**/*.java"
trimTrailingWhitespace()
removeUnusedImports()
googleJavaFormat()
endWithNewline()
}
kotlin {
target "**/*.kt"
ktlint().userData(['indent_size': '4', 'continuation_indent_size': '2', 'disabled_rules': 'no-wildcard-imports'])
licenseHeaderFile '../spotless.license.kt'
trimTrailingWhitespace()
endWithNewline()
}
format 'misc', {
target '**/*.gradle', '**/*.md', '**/.gitignore'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format 'xml', {
target '**/*.xml'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}