diff --git a/build.gradle b/build.gradle index 5c0df4b28..f7bde7b55 100644 --- a/build.gradle +++ b/build.gradle @@ -2,20 +2,42 @@ plugins { id 'java' id 'edu.sc.seis.launch4j' version '2.5.3' id 'kr.motd.sphinx' version '2.10.0' - id 'com.diffplug.spotless' version '5.14.2' + id 'com.diffplug.spotless' version '6.25.0' } -spotless { - java { - target '**/*.java' - } -} version '2.0.0' apply plugin: 'java' apply plugin: 'application' // apply plugin: 'checkstyle' + +spotless{ + enforceCheck false + + format 'misc', { + // define the files to apply `misc` to + target '*.gradle', '*.md', '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // or spaces. Takes an integer argument if you don't like 4 + endWithNewline() + } + + java{ + importOrder() + + removeUnusedImports() + + cleanthat() + + formatAnnotations() + + googleJavaFormat('1.19.2') + } +} + mainClassName = 'edu.rpi.legup.Legup' sourceCompatibility = 11