You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
1012 B

buildscript {
repositories repos
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.24.3"
}
}
apply plugin: com.diffplug.gradle.spotless.SpotlessPlugin
spotless {
java {
target fileTree(projectDir) {
include '**/*.java'
}
googleJavaFormat()
}
format 'misc', {
target fileTree(projectDir) {
include '**/.gitignore'
include '**/*.gradle'
include '**/*.adoc'
include '**/*.sh'
include '**/*.html'
include '**/*.js'
include '**/*.css'
include '**/*.xml'
include '**/*.xsd'
exclude '**/webapp/lib/*'
exclude '**/webapp/dist/*'
exclude '**/webapp/node_modules/*'
}
indentWithSpaces(2)
trimTrailingWhitespace()
endWithNewline()
}
format 'markdown', {
target '**/*.md'
indentWithSpaces(2)
endWithNewline()
}
}
task formatCode(dependsOn: ['licenseFormat', 'spotlessApply'])
build.dependsOn 'spotlessApply'