Add ModCheckTest to test runtime mod validations and entry point superclass checks. Include Gradle verification metadata for dependency integrity.

This commit is contained in:
Overlord committed 2026-10-03 09:59:47 +02:00
1 parent 18ff32b5ce
commit 6761f2d9ea
29 files changed
+1306 -72

No files matched your search

+15 -7
View File
@@ -2,6 +2,7 @@
plugins {
id("zomboidforge.java-conventions")
alias(libs.plugins.shadow)
}
dependencies {
@@ -11,12 +12,19 @@ dependencies {
compileOnly(files(projectZomboid.serverJar))
}
tasks.jar {
archiveBaseName = "zomboidforge-agent"
// The agent jar is appended to the system class path behind the game jar and includes api,
// core, compat runtime, and their libraries. The libraries are relocated, so a copy of the same
// library in the game jar cannot replace them.
tasks.shadowJar {
archiveBaseName = "zomboidforge-agent"
archiveClassifier = ""
manifest.attributes("Premain-Class" to "dev.overlord.zomboidforge.agent.ForgeAgent")
// The agent jar is appended to the system class path and includes api, core and compat runtime.
// Mapping the classpath to zip trees loses its task dependencies; the input restores them.
inputs.files(configurations.runtimeClasspath)
from(configurations.runtimeClasspath.map { classpath -> classpath.map { zipTree(it) } })
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
relocate("org.objectweb.asm", "dev.overlord.zomboidforge.shaded.asm")
relocate("com.electronwill.nightconfig", "dev.overlord.zomboidforge.shaded.nightconfig")
}
// Only the shadow jar is used; the plain jar would match the same file name pattern.
tasks.jar {
enabled = false
}