@@ -5,8 +5,8 @@ buildscript {
55}
66
77plugins {
8- id " fabric-loom" version " ${ loom_version} "
9- id " com.diffplug.spotless" version " 8.4 .0"
8+ id " net.fabricmc. fabric-loom" version " ${ loom_version} "
9+ id " com.diffplug.spotless" version " 8.3 .0"
1010}
1111
1212def ENV = System . getenv()
@@ -64,23 +64,20 @@ repositories {
6464dependencies {
6565 // To change the versions see the gradle.properties file
6666 minecraft " com.mojang:minecraft:${ project.minecraft_version} "
67- mappings loom. officialMojangMappings()
68- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
69- // Use Fabric Loader JUnit only for gametests, not for plain unit tests
70- // Standard JUnit for unit tests
71- testImplementation " org.junit.jupiter:junit-jupiter:5.10.2"
72- testRuntimeOnly " org.junit.platform:junit-platform-launcher:1.10.2"
67+ implementation " net.fabricmc:fabric-loader:${ project.loader_version} "
68+ testImplementation " org.junit.jupiter:junit-jupiter:5.13.4"
69+ testRuntimeOnly " org.junit.platform:junit-platform-launcher:1.13.4"
7370
7471 // Fabric API. This is technically optional, but you probably want it anyway.
75- modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_api_version} "
72+ implementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_api_version} "
7673
7774 // net.wurstclient.ai.PathPos extends net.minecraft.util.math.BlockPos,
7875 // which uses javax.annotation.concurrent.Immutable, which is part of
7976 // the JSR305 library.
8077 //
8178 // In other words, Wurst won't compile without this library,
8279 // even though it's Minecraft that actually uses it.
83- modImplementation " com.google.code.findbugs:jsr305:3.0.2"
80+ implementation " com.google.code.findbugs:jsr305:3.0.2"
8481}
8582
8683fabricApi. configureTests {
@@ -232,9 +229,8 @@ tasks.configureEach {
232229}
233230
234231tasks. withType(JavaCompile ). configureEach {
235- // Minecraft 1.20.5 (24w14a) upwards uses Java 21.
236- it. options. release = 21
237- it. options. compilerArgs + = " -Xlint:deprecation"
232+ // Minecraft 26.1 (26.1-snapshot-1) upwards uses Java 25.
233+ it. options. release = 25
238234}
239235
240236java {
@@ -243,8 +239,8 @@ java {
243239 // If you remove this line, sources will not be generated.
244240 withSourcesJar()
245241
246- sourceCompatibility = JavaVersion . VERSION_21
247- targetCompatibility = JavaVersion . VERSION_21
242+ sourceCompatibility = JavaVersion . VERSION_25
243+ targetCompatibility = JavaVersion . VERSION_25
248244}
249245
250246jar {
@@ -259,8 +255,9 @@ jar {
259255 exclude(" intentionally_untranslated.json" )
260256}
261257
262- tasks. named(" remapJar" ) {
263- archiveVersion = " ${ project.version} _v${ forkReleaseVersion} "
258+ tasks. configureEach {
259+ if (name == " remapJar" )
260+ archiveVersion = " ${ project.version} _v${ forkReleaseVersion} "
264261}
265262
266263import com.diffplug.spotless.generic.LicenseHeaderStep
@@ -287,9 +284,6 @@ spotless {
287284
288285test {
289286 useJUnitPlatform()
290- // Ensure Fabric Loader JUnit can see the test classes as a classpath group
291- // to avoid "hasn't been exposed to the game" errors in-dev.
292- systemProperty " fabric.classPathGroups" , " default,test"
293287}
294288
295289def getGhVersion () {
@@ -341,8 +335,8 @@ task github(dependsOn: build) {
341335 ghRelease = releaseBuilder. create()
342336 }
343337
344- ghRelease. uploadAsset(remapJar . archiveFile. get(). getAsFile(), " application/java-archive" )
345- ghRelease. uploadAsset(remapSourcesJar . archiveFile. get(). getAsFile(), " application/java-archive" )
338+ ghRelease. uploadAsset(jar . archiveFile. get(). getAsFile(), " application/java-archive" )
339+ ghRelease. uploadAsset(sourcesJar . archiveFile. get(). getAsFile(), " application/java-archive" )
346340 }
347341}
348342
0 commit comments