Files
LuaModAutomator/build.gradle.kts
T

43 lines
1.7 KiB
Kotlin

// id, name, version, and entry point: settings.gradle.kts
zomboidForge {
game("42") // ServerOptions, GameServer, SteamWorkshop, CommandBase
serverImage = "git.security-command.org/overlord/zomboidforge:0.6.0-pz42.21"
}
dependencies {
implementation("com.google.code.gson:gson:2.13.2") // bundled into the mod's lib/
compileOnly("org.jetbrains:annotations:26.0.2")
testCompileOnly("org.jetbrains:annotations:26.0.2")
// ZomboidForge's config.toml parser and binder, to bind the settings the way the server does.
testImplementation("dev.overlord.zomboidforge:mod-tools:0.6.0")
testImplementation(platform("org.junit:junit-bom:6.1.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
// Gson's Error Prone annotations matter only to the compiler; lib/ is the runtime classpath.
configurations.runtimeClasspath {
exclude(group = "com.google.errorprone")
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.addAll(listOf("-Xlint:all", "-Xlint:-options", "-Xlint:-path"))
}
tasks.test {
useJUnitPlatform()
}
// Prints what the server would set for a config.toml: ./gradlew -q resolveCollection --args=<config.toml>
tasks.register<JavaExec>("resolveCollection") {
group = "zomboidforge"
description = "Resolves the collection of a config.toml like the server does at startup and prints Mods=, WorkshopItems=, and Map=."
classpath = sourceSets.test.get().runtimeClasspath
mainClass = "dev.overlord.luamodautomator.ResolveCollection"
workingDir = File(System.getProperty("user.dir"))
}