chore: unify checkstyle, fix violations, cleanup bin/

This commit is contained in:
loki5512344 2026-07-12 00:59:11 +02:00
parent 1d8c0ca483
commit a0c1ab8ca1
Signed by: boba
GPG key ID: 253067914055423B
156 changed files with 5222 additions and 4348 deletions

View file

@ -1,6 +1,7 @@
plugins {
java
id("com.github.johnrengelman.shadow") version "8.1.1"
checkstyle
}
group = "com.loki"
@ -19,75 +20,47 @@ tasks.withType<JavaCompile> {
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
// PlaceholderAPI
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
// WorldGuard / WorldEdit
maven("https://maven.enginehub.org/repo/")
// CodeMC (DecentHolograms)
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://jitpack.io")
}
val lolibTree = fileTree("libs") {
include("lolib*.jar")
}
if (lolibTree.files.isEmpty()) {
throw GradleException(
"Missing libs/lolib*.jar — add LoAPI fat jar to ${rootProject.file("libs").absolutePath}"
)
}
dependencies {
// Paper
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
// Local API
implementation(lolibTree)
// Commons
compileOnly("org.apache.commons:commons-math3:3.6.1")
compileOnly("commons-io:commons-io:2.18.0")
// Adventure
compileOnly("net.kyori:adventure-api:4.17.0")
compileOnly("net.kyori:adventure-text-minimessage:4.17.0")
// PlaceholderAPI
implementation("org.apache.commons:commons-math3:3.6.1")
implementation("commons-io:commons-io:2.18.0")
compileOnly("me.clip:placeholderapi:2.11.6")
// WorldGuard + WorldEdit
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.13")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.10")
// Optional
// compileOnly("com.github.oraxen:oraxen:1.180.0")
// compileOnly("com.github.LoneDev6:api-itemsadder:3.6.4")
// Tests
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("io.kotest:kotest-assertions-core:5.9.1")
testImplementation("io.kotest:kotest-property:5.9.1")
testImplementation("org.mockito:mockito-core:5.14.2")
testImplementation("org.mockito:mockito-inline:5.2.0")
// Bukkit/Paper API for tests
testImplementation("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
// Adventure for tests
testImplementation("net.kyori:adventure-api:4.17.0")
testImplementation("net.kyori:adventure-text-minimessage:4.17.0")
}
checkstyle {
toolVersion = "10.21.4"
configFile = file("config/checkstyle/checkstyle.xml")
isIgnoreFailures = false
maxErrors = 0
maxWarnings = 0
}
tasks.withType<Checkstyle>().configureEach {
reports {
xml.required.set(true)
html.required.set(true)
}
}
tasks {
shadowJar {