1
0
mirror of https://github.com/chylex/Minecraft-Window-Title.git synced 2025-02-20 21:46:02 +01:00

Update Gradle and build scripts for Minecraft 1.21.4

This commit is contained in:
chylex 2025-01-29 16:44:32 +01:00
parent dbbd5b60f5
commit 43698d23b5
Signed by: chylex
SSH Key Fingerprint: SHA256:WqM8X/1DDn11LbYM0H5wsqZUjbcKxVsic37L+ERcF4o
8 changed files with 48 additions and 11 deletions

View File

@ -1,6 +1,8 @@
import net.fabricmc.loom.configuration.ide.RunConfigSettings
import org.gradle.jvm.tasks.Jar
val modId: String by project
val modSides: String by project
val minecraftVersion: String by project
val fabricVersion: String by project
@ -24,12 +26,24 @@ loom {
ideConfigGenerated(true)
}
named("client") {
fun side(name: String, configure: RunConfigSettings.() -> Unit) {
if (modSides == "both" || modSides == name) {
named(name, configure)
}
else {
findByName(name)?.let(::remove)
}
}
side("client") {
configName = "Fabric Client"
client()
}
findByName("server")?.let(::remove)
side("server") {
configName = "Fabric Server"
server()
}
}
mixin {
@ -47,7 +61,7 @@ tasks.register<Jar>("uncompressedRemapJar") {
group = "fabric"
from(tasks.remapJar.map { it.outputs.files.map(::zipTree) })
archiveClassifier.set("uncompressed")
entryCompression = ZipEntryCompression.STORED // Reduces size of multiloader jar.
}

View File

@ -1,4 +1,7 @@
import net.neoforged.moddevgradle.dsl.RunModel
val modId: String by project
val modSides: String by project
val neoForgeVersion: String by project
plugins {
@ -23,10 +26,21 @@ neoForge {
jvmArguments.addAll(runJvmArgs)
}
register("client") {
fun side(name: String, configure: RunModel.() -> Unit) {
if (modSides == "both" || modSides == name) {
register(name, configure)
}
}
side("client") {
ideName.set("NeoForge Client")
client()
}
side("server") {
ideName.set("NeoForge Server")
server()
}
}
}

View File

@ -116,6 +116,10 @@ allprojects {
inputs.property("minimumMinecraftVersion", minimumMinecraftVersion)
inputs.property("minimumNeoForgeVersion", minimumNeoForgeVersion)
inputs.property("minimumFabricVersion", minimumFabricVersion)
from(rootProject.file("logo.png")) {
into("assets/$modId")
}
}
tasks.withType<AbstractArchiveTask>().configureEach {

View File

@ -10,13 +10,14 @@ modIssuesURL=https://github.com/chylex/Minecraft-Window-Title/issues
modSides=client
# Dependencies
minecraftVersion=1.21
neoForgeVersion=21.0.0-beta
neoModDevVersion=1.0.21
fabricVersion=0.15.11
loomVersion=1.7
minecraftVersion=1.21.4
neoForgeVersion=21.4.77-beta
neoModDevVersion=2.0.76
fabricVersion=0.16.10
loomVersion=1.9
mixinVersion=0.12.5+mixin.0.8.5
# https://projects.neoforged.net/neoforged/neoforge
# https://projects.neoforged.net/neoforged/moddevgradle
# https://fabricmc.net/develop/
# https://github.com/FabricMC/fabric-loom/releases

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

4
gradlew vendored
View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

2
gradlew.bat vendored
View File

@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################