spotless (#34)

* Do not hardcode tag names and remove not needed README comment

* Remove useless dependencies

* Deduplicate build code

* Run spotless to keep codebase clean
This commit is contained in:
Alex
2024-10-27 21:04:47 +01:00
committed by GitHub
parent e05f38fcc2
commit 83148d8040
32 changed files with 169 additions and 692 deletions
@@ -0,0 +1,37 @@
plugins {
idea
`java-library`
id("io.freefair.lombok")
id("com.diffplug.spotless")
}
spotless {
java {
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
importOrder("", "javax|java", "\\#")
}
}
afterEvaluate {
tasks.processResources {
filteringCharset = "UTF-8"
filesMatching("fabric.mod.json") {
expand("version" to rootProject.version)
}
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}