plugins { java id("net.neoforged.moddev") version "2.0.146" } group = "online.astradev" version = "0.1.1" repositories { mavenCentral() } dependencies { compileOnly(files(providers.gradleProperty("astraPlusJar").orElse("../AstraPlus/build/libs/AstraPlus-0.5.67.jar"))) testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4") } neoForge { version = "26.2.0.79" mods { create("astraweapons") { sourceSet(sourceSets.main.get()) } } } java { toolchain.languageVersion.set(JavaLanguageVersion.of(25)); withSourcesJar() } tasks.withType().configureEach { options.encoding = "UTF-8"; options.release.set(25) } tasks.processResources { inputs.property("modVersion", project.version) filesMatching("META-INF/neoforge.mods.toml") { expand("version" to project.version) } } tasks.test { useJUnitPlatform() } sourceSets.test { compileClasspath += sourceSets.main.get().compileClasspath runtimeClasspath += sourceSets.main.get().compileClasspath } val verification = sourceSets.create("verification") { compileClasspath += sourceSets.main.get().output + sourceSets.main.get().compileClasspath runtimeClasspath += output + compileClasspath } tasks.register("verificationJar") { from(verification.output); archiveClassifier.set("verification") } val clientVerification = sourceSets.create("clientVerification") { compileClasspath += sourceSets.main.get().compileClasspath.filter { !it.name.startsWith("AstraPlus-") } runtimeClasspath += output + compileClasspath + sourceSets.main.get().runtimeClasspath } neoForge { mods { create("astraweapons_client_verify") { sourceSet(clientVerification) } } runs { create("weaponsCaptureClient") { client(); sourceSet.set(clientVerification) loadedMods.set(setOf(mods.getByName("astraweapons_client_verify"))) gameDirectory.set(file(providers.gradleProperty("captureClientDirectory").orElse("build/capture-client").get())) systemProperty("astraweapons.captureServer", providers.gradleProperty("captureServerDirectory").orElse("build/capture-server").get()) systemProperty("astraweapons.capturePort", providers.gradleProperty("capturePort").orElse("26705").get()) programArgument("--width"); programArgument("960");programArgument("--height"); programArgument("540") programArgument("--username");programArgument("WeaponReview") } } }