Skip to content

Commit 90654af

Browse files
committed
chore: Update to Minecraft 1.21.11 and Gradle 9
Update addon to support Meteor Client 1.21.11 and latest tooling: - Minecraft: 1.21.10 → 1.21.11 - Yarn mappings: 1.21.10+build.2 → 1.21.11+build.3 - Fabric Loader: 0.17.3 → 0.18.2 - Loom: 1.12-SNAPSHOT → 1.14-SNAPSHOT - Meteor Client: 1.21.10-SNAPSHOT → 1.21.11-SNAPSHOT - Gradle wrapper: 8.14.3 → 9.2.0 Fixed Gradle 9 compatibility by splitting WebUI build into separate installWebUI and buildWebUI tasks to avoid protected exec() calls. Added junit-platform-launcher dependency required for Gradle 9.0+.
1 parent 6eef38a commit 90654af

4 files changed

Lines changed: 26 additions & 17 deletions

File tree

build.gradle.kts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies {
4343
// Testing
4444
testImplementation(libs.junit.api)
4545
testRuntimeOnly(libs.junit.engine)
46+
testRuntimeOnly(libs.junit.platform.launcher)
4647
}
4748

4849
tasks {
@@ -85,26 +86,33 @@ tasks {
8586
useJUnitPlatform()
8687
}
8788

89+
// Install WebUI dependencies
90+
register<Exec>("installWebUI") {
91+
group = "build"
92+
description = "Install Vue.js WebUI dependencies"
93+
94+
val webuiDir = file("webui")
95+
val npmCommand = if (System.getProperty("os.name").lowercase().contains("windows")) "npm.cmd" else "npm"
96+
97+
workingDir = webuiDir
98+
commandLine(npmCommand, "install")
99+
100+
onlyIf {
101+
!file("webui/node_modules").exists()
102+
}
103+
}
104+
88105
// Build WebUI with npm
89106
register<Exec>("buildWebUI") {
90107
group = "build"
91108
description = "Build the Vue.js WebUI"
109+
dependsOn("installWebUI")
92110

93111
val webuiDir = file("webui")
94112
val npmCommand = if (System.getProperty("os.name").lowercase().contains("windows")) "npm.cmd" else "npm"
95113

96114
workingDir = webuiDir
97115
commandLine(npmCommand, "run", "build")
98-
99-
// Install dependencies first if node_modules doesn't exist
100-
doFirst {
101-
if (!file("webui/node_modules").exists()) {
102-
exec {
103-
workingDir = webuiDir
104-
commandLine(npmCommand, "install")
105-
}
106-
}
107-
}
108116
}
109117

110118
// Copy built WebUI to resources

gradle/libs.versions.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
mod-version = "0.2.0"
44

55
# Minecraft
6-
minecraft = "1.21.10"
7-
yarn-mappings = "1.21.10+build.2"
8-
fabric-loader = "0.17.3"
9-
loom = "1.12-SNAPSHOT"
6+
minecraft = "1.21.11"
7+
yarn-mappings = "1.21.11+build.3"
8+
fabric-loader = "0.18.2"
9+
loom = "1.14-SNAPSHOT"
1010

1111
# Dependencies
12-
meteor = "1.21.10-SNAPSHOT"
12+
meteor = "1.21.11-SNAPSHOT"
1313
orbit = "0.2.4"
1414

1515
# WebServer and WebSocket
@@ -39,6 +39,7 @@ gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
3939
# Testing
4040
junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
4141
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
42+
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
4243

4344
[plugins]
4445
fabric-loom = { id = "fabric-loom", version.ref = "loom" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"depends": {
2828
"java": ">=21",
29-
"minecraft": ">=1.21.10",
29+
"minecraft": ">=1.21.11",
3030
"meteor-client": ">=0.5.0"
3131
}
3232
}

0 commit comments

Comments
 (0)