fix: build — add test dependencies, fix ProGuard, remove obfuscation from default build

This commit is contained in:
loki5512344 2026-06-14 16:21:31 +02:00
parent 7c7562a8d4
commit 183df22d13
6 changed files with 1025 additions and 493 deletions

View file

@ -15,6 +15,16 @@ dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
compileOnly("com.comphenix.protocol:ProtocolLib:5.3.0")
proguardConfig("com.guardsquare:proguard-base:7.4.2")
testImplementation("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4")
testImplementation("org.mockito:mockito-core:5.14.2")
testImplementation("org.mockito:mockito-junit-jupiter:5.14.2")
}
tasks.test {
useJUnitPlatform()
}
java {
@ -72,8 +82,9 @@ val obfuscateTask = tasks.register<JavaExec>("obfuscate") {
"-keep", "class dev.loki.config.** { *; }",
"-dontoptimize",
"-dontobfuscate",
"-dontpreverify",
"-allowaccessmodification",
"-repackageclasses", "mdbd",
"-keepattributes", "Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,EnclosingMethod"
)
@ -117,7 +128,5 @@ tasks {
}
}
named("build") {
dependsOn("replaceWithObfuscated")
}
// obfuscation is optional — run `gradle obfuscate` manually
}