aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle.kts35
-rw-r--r--changelog.md1
-rw-r--r--settings.gradle.kts2
-rw-r--r--src/main/resources/META-INF/neoforge.mods.toml31
-rw-r--r--versions/1.20.5-neoforge/gradle.properties11
5 files changed, 47 insertions, 33 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 1784b0e..6dfe457 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,15 +2,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
- kotlin("jvm") version "1.9.22"
+ kotlin("jvm") version "1.9.23"
id("dev.architectury.loom") version "1.6.+"
id("me.modmuss50.mod-publish-plugin") version "0.5.+"
`maven-publish`
id("org.ajoberstar.grgit") version "5.0.+"
-
- id("io.github.p03w.machete") version "2.+"
}
val loader = loom.platform.get().name.lowercase()
@@ -181,7 +179,6 @@ dependencies {
java {
withSourcesJar()
- //withJavadocJar()
}
tasks {
@@ -210,11 +207,9 @@ tasks {
if (isFabric) {
filesMatching("fabric.mod.json") { expand(props) }
- exclude("META-INF/mods.toml")
}
if (isForgeLike) {
- filesMatching("META-INF/mods.toml") { expand(props) }
- exclude("fabric.mod.json")
+ filesMatching(listOf("META-INF/mods.toml", "META-INF/neoforge.mods.toml")) { expand(props) }
}
}
@@ -226,10 +221,6 @@ tasks {
}
}
-machete {
- json.enabled.set(false)
-}
-
java {
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
@@ -273,10 +264,6 @@ publishMods {
requires { slug.set("fabric-api") }
}
-
- tasks.getByName("publishModrinth") {
- dependsOn("optimizeOutputsOfRemapJar")
- }
}
val curseforgeId: String by project
@@ -288,10 +275,6 @@ publishMods {
requires { slug.set("fabric-api") }
}
-
- tasks.getByName("publishCurseforge") {
- dependsOn("optimizeOutputsOfRemapJar")
- }
}
val githubProject: String by project
@@ -301,10 +284,6 @@ publishMods {
accessToken.set(findProperty("github.token")?.toString())
commitish.set(grgit.branch.current().name)
}
-
- tasks.getByName("publishGithub") {
- dependsOn("optimizeOutputsOfRemapJar")
- }
}
}
@@ -337,22 +316,14 @@ publishing {
this.password = password
}
}
- tasks.getByName("publishModPublicationToXanderReleasesRepository") {
- dependsOn("optimizeOutputsOfRemapJar")
- }
} else {
println("Xander Maven credentials not satisfied.")
}
}
}
-tasks.getByName("generateMetadataFileForModPublication") {
- dependsOn("optimizeOutputsOfRemapJar")
-}
-
-fun <T> optionalProp(property: String, block: (String) -> T?) {
+fun <T> optionalProp(property: String, block: (String) -> T?): T? =
findProperty(property)?.toString()?.takeUnless { it.isBlank() }?.let(block)
-}
fun isPropDefined(property: String): Boolean {
return property(property)?.toString()?.isNotBlank() ?: false
diff --git a/changelog.md b/changelog.md
index 19553ea..86a41b7 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,6 +6,7 @@ This build supports the following versions:
- Fabric 1.20.5
- Forge 1.20.1
- NeoForge 1.20.4
+- NeoForge 1.20.5
## Bug Fixes
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 184e591..89d62fb 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -28,7 +28,7 @@ extensions.configure<StonecutterSettings> {
mc("1.20.4", loaders = listOf("fabric", "neoforge"))
mc("1.20.1", loaders = listOf("fabric", "forge"))
- mc("1.20.5", loaders = listOf("fabric"))
+ mc("1.20.5", loaders = listOf("fabric", "neoforge"))
}
create(rootProject)
}
diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml
new file mode 100644
index 0000000..3954b6f
--- /dev/null
+++ b/src/main/resources/META-INF/neoforge.mods.toml
@@ -0,0 +1,31 @@
+modLoader = "javafml"
+loaderVersion = "${loaderVersion}"
+#issueTrackerURL = ""
+license = "LGPL-3.0-or-later"
+
+[[mods]]
+modId = "${id}"
+version = "${version}"
+displayName = "${name}"
+authors = "isXander"
+description = '''
+${description}
+'''
+logoFile = "yacl-128x.png"
+
+[[mixins]]
+config = "yacl.mixins.json"
+
+[["dependencies.${id}"]]
+modId = "${forgeId}"
+mandatory = true
+versionRange = "${forgeConstraint}"
+ordering = "NONE"
+side = "BOTH"
+
+[["dependencies.${id}"]]
+modId = "minecraft"
+mandatory = true
+versionRange = "${mc}"
+ordering = "NONE"
+side = "BOTH"
diff --git a/versions/1.20.5-neoforge/gradle.properties b/versions/1.20.5-neoforge/gradle.properties
new file mode 100644
index 0000000..340219d
--- /dev/null
+++ b/versions/1.20.5-neoforge/gradle.properties
@@ -0,0 +1,11 @@
+loom.platform=neoforge
+
+java.version=21
+
+deps.quiltMappings=
+deps.neoforge=20.5.20-beta
+
+modstoml.mcDep=[1.20.5,1.20.6]
+modstoml.loaderVersion=[1,)
+modstoml.forgeId=neoforge
+modstoml.forgeConstraint=[20,)