// Java agent for runtime work (mod loading, live patches). Build-time patches are in :patcher. plugins { id("zomboidforge.java-conventions") alias(libs.plugins.shadow) } dependencies { implementation(project(":api")) implementation(project(":core")) implementation(project(projectZomboid.compatProject("runtime"))) compileOnly(files(projectZomboid.serverJar)) } // 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") 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 }