2026-09-08 19:44:45 +03:00
|
|
|
plugins {
|
|
|
|
|
java
|
|
|
|
|
id("net.neoforged.moddev") version "2.0.146"
|
2026-09-05 13:34:00 +03:00
|
|
|
}
|
2026-09-08 19:44:45 +03:00
|
|
|
group = "online.astradev"
|
2026-09-08 22:43:03 +03:00
|
|
|
version = "0.2.1"
|
2026-09-08 19:44:45 +03:00
|
|
|
repositories { mavenCentral() }
|
|
|
|
|
val astraPlusApi = providers.gradleProperty("astraPlusApi")
|
2026-09-08 22:43:03 +03:00
|
|
|
.orElse("../AstraPlus/build/libs/AstraPlus-0.5.8-api.jar")
|
2026-09-05 13:34:00 +03:00
|
|
|
dependencies {
|
2026-09-08 19:44:45 +03:00
|
|
|
compileOnly(files(astraPlusApi))
|
2026-09-05 13:34:00 +03:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
|
|
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4")
|
|
|
|
|
}
|
2026-09-08 19:44:45 +03:00
|
|
|
neoForge {
|
|
|
|
|
version = "26.2.0.79"
|
|
|
|
|
mods { create("astracauldron") { sourceSet(sourceSets.main.get()) } }
|
|
|
|
|
}
|
|
|
|
|
java {
|
|
|
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
|
|
|
|
withSourcesJar()
|
|
|
|
|
}
|
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
|
options.release.set(25)
|
|
|
|
|
}
|
2026-09-05 15:24:44 +03:00
|
|
|
tasks.processResources {
|
2026-09-08 19:44:45 +03:00
|
|
|
inputs.property("modVersion", project.version)
|
|
|
|
|
filesMatching("META-INF/neoforge.mods.toml") { expand("version" to project.version) }
|
2026-09-05 15:24:44 +03:00
|
|
|
}
|
2026-09-05 13:34:00 +03:00
|
|
|
tasks.test { useJUnitPlatform() }
|
2026-09-08 19:44:45 +03:00
|
|
|
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<Jar>("verificationJar") {
|
|
|
|
|
from(verification.output)
|
|
|
|
|
archiveClassifier.set("verification")
|
|
|
|
|
}
|