Create optional AstraPlus admin editor with validated forms and protocol
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
plugins {
|
||||
java
|
||||
id("net.neoforged.moddev") version "2.0.146"
|
||||
}
|
||||
|
||||
group = "online.astradev"
|
||||
version = "0.1.0"
|
||||
repositories { mavenCentral() }
|
||||
dependencies {
|
||||
testImplementation("com.google.code.gson:gson:2.14.0")
|
||||
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("astrapluseditor") { sourceSet(sourceSets.main.get()) } }
|
||||
}
|
||||
java { toolchain.languageVersion.set(JavaLanguageVersion.of(25)) }
|
||||
tasks.withType<JavaCompile>().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() }
|
||||
|
||||
val verification = sourceSets.create("verification") {
|
||||
compileClasspath += sourceSets.main.get().output + sourceSets.main.get().compileClasspath
|
||||
runtimeClasspath += output + compileClasspath + sourceSets.main.get().runtimeClasspath
|
||||
}
|
||||
val compatibility = sourceSets.create("compatibility") {
|
||||
compileClasspath += sourceSets.main.get().compileClasspath
|
||||
runtimeClasspath += output + compileClasspath + sourceSets.main.get().runtimeClasspath
|
||||
}
|
||||
neoForge {
|
||||
mods {
|
||||
create("astrapluseditor_verify") { sourceSet(verification) }
|
||||
create("astrapluseditor_compat") { sourceSet(compatibility) }
|
||||
}
|
||||
runs {
|
||||
create("verificationClient") {
|
||||
client()
|
||||
sourceSet.set(verification)
|
||||
loadedMods.set(setOf(mods.getByName("astrapluseditor"), mods.getByName("astrapluseditor_verify")))
|
||||
gameDirectory.set(layout.buildDirectory.dir("isolated-editor"))
|
||||
systemProperty("astrapluseditor.isolatedVerification", "true")
|
||||
systemProperty("astrapluseditor.networkVerification", providers.gradleProperty("networkVerification").orElse("false").get())
|
||||
programArgument("--width"); programArgument("1280")
|
||||
programArgument("--height"); programArgument("720")
|
||||
programArgument("--username"); programArgument("AstraEditVerify")
|
||||
}
|
||||
create("compatibilityClient") {
|
||||
client()
|
||||
sourceSet.set(compatibility)
|
||||
loadedMods.set(setOf(mods.getByName("astrapluseditor_compat")))
|
||||
gameDirectory.set(layout.buildDirectory.dir("isolated-noeditor"))
|
||||
systemProperty("astrapluseditor.isolatedVerification", "true")
|
||||
programArgument("--width"); programArgument("960")
|
||||
programArgument("--height"); programArgument("540")
|
||||
programArgument("--username"); programArgument("AstraGuest")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user