We are awaiting cloth config for a release. We also need to make a fix for MC-297591, as we revert Mojang's solution. Mojang's solution makes the rest of the chunk system's timing with tickets unpredictable, which is almost certainly too large of a change on its own. Surely, the ender pearl code could be modified to fix this properly.
151 lines
4.4 KiB
Groovy
151 lines
4.4 KiB
Groovy
import me.modmuss50.mpp.ReleaseType
|
|
|
|
plugins {
|
|
id("java-library")
|
|
id("net.neoforged.moddev")
|
|
id("me.modmuss50.mod-publish-plugin") version "0.8.4" apply false
|
|
}
|
|
|
|
extensions.create("runConfigCommon", RunConfigCommon.class)
|
|
|
|
def getGitCommit = providers.exec {
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
}.standardOutput.getAsText().map { it.trim() }
|
|
|
|
def aw2at = Aw2AtTask.configureDefault(
|
|
getProject(),
|
|
layout.projectDirectory.file("src/main/resources/moonrise.accesswidener").getAsFile(),
|
|
sourceSets.main
|
|
)
|
|
|
|
neoForge {
|
|
neoFormVersion = neoform_version
|
|
validateAccessTransformers = true
|
|
accessTransformers.files.setFrom(aw2at.flatMap { t -> t.getOutputFile() })
|
|
}
|
|
|
|
runConfigCommon {
|
|
systemProperties.put "mixin.debug", "true"
|
|
systemProperties.put "Moonrise.MaxViewDistance", "128"
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "net.fabricmc:sponge-mixin:0.15.4+mixin.0.8.7"
|
|
compileOnly "io.github.llamalad7:mixinextras-common:0.4.1"
|
|
// work around minecraft (MDG) forcing ASM 9.3 which is incompatible with the above deps...
|
|
components.withModule("net.neoforged:minecraft-dependencies", RemoveAsmConstraint.class)
|
|
|
|
api("ca.spottedleaf:concurrentutil:${rootProject.concurrentutil_version}") { setTransitive(false) }
|
|
api("ca.spottedleaf:yamlconfig:${rootProject.yamlconfig_version}") { setTransitive(false) }
|
|
api("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
|
|
|
|
// todo: does cloth publish a platform-agnostic jar in mojang mappings?
|
|
compileOnly "me.shedaniel.cloth:cloth-config-neoforge:${rootProject.cloth_version}"
|
|
}
|
|
|
|
allprojects {
|
|
group = rootProject.maven_group
|
|
version = rootProject.mod_version + "+" + getGitCommit.get()
|
|
|
|
plugins.apply("java-library")
|
|
|
|
java {
|
|
withSourcesJar()
|
|
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation "org.junit.jupiter:junit-jupiter:${rootProject.junit_version}"
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url = "https://repo.papermc.io/repository/maven-public/"
|
|
mavenContent {
|
|
includeGroup("ca.spottedleaf")
|
|
}
|
|
}
|
|
maven {
|
|
url = "https://api.modrinth.com/maven"
|
|
mavenContent {
|
|
includeGroup("maven.modrinth")
|
|
}
|
|
}
|
|
maven { url = "https://maven.shedaniel.me/" }
|
|
maven { url = "https://maven.terraformersmc.com/releases/" }
|
|
}
|
|
|
|
// make build reproducible
|
|
tasks.withType(AbstractArchiveTask).configureEach {
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.release = 21
|
|
}
|
|
|
|
tasks.jar.configure {
|
|
from(rootProject.file("LICENSE")) {
|
|
rename { "${it}_${rootProject.base.archivesName.get()}"}
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
plugins.apply("me.modmuss50.mod-publish-plugin")
|
|
plugins.apply 'java-library'
|
|
plugins.apply 'com.gradleup.shadow'
|
|
|
|
configurations.create("libs")
|
|
configurations.shadow {
|
|
extendsFrom(configurations.libs)
|
|
}
|
|
configurations.implementation {
|
|
extendsFrom(configurations.libs)
|
|
}
|
|
|
|
publishMods {
|
|
if (project.version.contains("-beta.")) {
|
|
type = ReleaseType.BETA
|
|
} else {
|
|
type = ReleaseType.STABLE
|
|
}
|
|
changelog = providers.environmentVariable("RELEASE_NOTES")
|
|
|
|
List<String> supportedMcVersions = rootProject.supported_minecraft_versions.split(',')
|
|
|
|
modrinth {
|
|
projectId = "KOHu7RCS"
|
|
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
|
|
minecraftVersions = supportedMcVersions
|
|
}
|
|
|
|
curseforge {
|
|
projectId = "1096335"
|
|
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
|
|
minecraftVersions = supportedMcVersions
|
|
}
|
|
}
|
|
|
|
// Setup a run with lithium for compatibility testing
|
|
configurations.create("lithium")
|
|
dependencies {
|
|
String coordinates = "maven.modrinth:lithium:"
|
|
if (getProject().name == "Moonrise-NeoForge") {
|
|
coordinates += rootProject.neo_lithium_version
|
|
} else {
|
|
coordinates += rootProject.fabric_lithium_version
|
|
}
|
|
lithium coordinates
|
|
}
|
|
}
|