@@ -138,32 +138,36 @@ configure(subprojects.findAll { it.name.startsWith("bosk-") || it.name == "boson
138138 }
139139}
140140
141- // TODO: Spotless currently isn't doing anything and I can't figure out why
142- spotless {
143- enforceCheck = false
144- java {
145- importOrder ' ' , ' \\ #' // Static imports after regular imports, as per mt-server standard and IntelliJ default
146- removeUnusedImports()
147- trimTrailingWhitespace()
148- leadingSpacesToTabs()
149- replaceRegex ' class-level javadoc indentation fix' , / ^\* / , ' *'
150- replaceRegex ' method-level javadoc indentation fix' , / \t\* / , ' \t *'
151- }
152- format ' gradle' , {
153- target ' **/*.gradle'
141+ // Spotless configuration
142+ subprojects {
143+ apply plugin : ' com.diffplug.spotless'
144+ spotless {
145+ java {
146+ importOrder ' ' , ' \\ #' // Static imports after regular imports, as per mt-server standard and IntelliJ default
147+ removeUnusedImports()
148+ expandWildcardImports()
149+ forbidModuleImports()
150+ trimTrailingWhitespace()
151+ leadingSpacesToTabs()
152+ replaceRegex ' class-level javadoc indentation fix' , / ^\* / , ' *'
153+ replaceRegex ' method-level javadoc indentation fix' , / \t\* / , ' \t *'
154+ }
155+ format ' gradle' , {
156+ target ' **/*.gradle'
154157
155- trimTrailingWhitespace()
156- leadingSpacesToTabs()
157- endWithNewline()
158- }
159- format ' misc' , {
160- target ' **/*.md' , ' **/.gitignore'
161-
162- trimTrailingWhitespace()
163- // leadingSpacesToTabs() For markdown, we want to align some code examples very carefully, so we use spaces
164- replaceRegex ' class-level javadoc indentation fix' , / ^\* / , ' *'
165- replaceRegex ' method-level javadoc indentation fix' , / \t\* / , ' \t *'
166- endWithNewline()
158+ trimTrailingWhitespace()
159+ leadingSpacesToTabs()
160+ endWithNewline()
161+ }
162+ format ' misc' , {
163+ target ' **/*.md' , ' **/.gitignore'
164+
165+ trimTrailingWhitespace()
166+ // leadingSpacesToTabs() For markdown, we want to align some code examples very carefully, so we use spaces
167+ replaceRegex ' class-level javadoc indentation fix' , / ^\* / , ' *'
168+ replaceRegex ' method-level javadoc indentation fix' , / \t\* / , ' \t *'
169+ endWithNewline()
170+ }
167171 }
168172}
169173
0 commit comments