PlayerAndroid/spotless.gradle

30 lines
801 B
Groovy
Raw Normal View History

2020-10-06 08:46:04 +00:00
apply plugin: "com.diffplug.gradle.spotless"
spotless {
java {
2020-10-06 09:06:16 +00:00
target "src/*.java"
2020-10-06 08:46:04 +00:00
trimTrailingWhitespace()
removeUnusedImports()
googleJavaFormat()
endWithNewline()
}
kotlin {
2020-10-06 09:06:16 +00:00
target "src/*.kt"
2020-10-06 08:46:04 +00:00
ktlint().userData(['indent_size': '4', 'continuation_indent_size': '2', 'disabled_rules': 'no-wildcard-imports'])
licenseHeaderFile '../spotless.license.kt'
trimTrailingWhitespace()
endWithNewline()
}
2020-10-06 09:07:45 +00:00
format 'misc', {
target '**/*.gradle', '**/*.md', '**/.gitignore'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format 'xml', {
target 'src/*.xml'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
2020-10-06 08:46:04 +00:00
}