@@ -2,13 +2,6 @@ buildscript {
22 dependencies {
33 classpath " org.kohsuke:github-api:1.330"
44 }
5-
6- configurations. classpath {
7- resolutionStrategy {
8- // v28.0-jre, used by fabric-loom 1.13.3, is vulnerable to CVE-2020-8908 and CVE-2023-2976
9- force " com.google.guava:guava:32.0.1-jre"
10- }
11- }
125}
136
147plugins {
@@ -33,24 +26,6 @@ repositories {
3326 // for more information about repositories.
3427}
3528
36- // Override vulnerable dependencies until Minecraft updates to newer versions
37- configurations. all {
38- resolutionStrategy {
39- // v2.5.1, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2024-57699
40- force " net.minidev:json-smart:2.5.2"
41- // v2.13.4, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-52999
42- force " com.fasterxml.jackson.core:jackson-core:2.15.0"
43- // v3.17.0, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-48924
44- force " org.apache.commons:commons-lang3:3.18.0"
45- // v9.40, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-53864
46- force " com.nimbusds:nimbus-jose-jwt:10.0.2"
47- // v4.1.118.Final, used by Minecraft 1.21.5 - 1.21.10, is vulnerable to CVE-2025-58057
48- force " io.netty:netty-codec:4.1.125.Final"
49- // v4.1.118.Final, used by Minecraft 1.21.5 - 1.21.10, is vulnerable to CVE-2025-58056
50- force " io.netty:netty-codec-http:4.1.125.Final"
51- }
52- }
53-
5429dependencies {
5530 // To change the versions see the gradle.properties file
5631 minecraft " com.mojang:minecraft:${ project.minecraft_version} "
@@ -70,53 +45,16 @@ dependencies {
7045 modImplementation " com.google.code.findbugs:jsr305:3.0.2"
7146}
7247
73- loom {
74- accessWidenerPath = file(" src/main/resources/wurst.accesswidener" )
75- }
76-
77- configurations {
78- productionRuntime {
79- extendsFrom configurations. minecraftLibraries
80- extendsFrom configurations. loaderLibraries
81- extendsFrom configurations. minecraftRuntimeLibraries
82- }
83- }
84-
85- dependencies {
86- productionRuntime " net.fabricmc:fabric-loader:${ project.loader_version} "
87- productionRuntime " net.fabricmc:intermediary:${ project.minecraft_version} "
48+ fabricApi. configureTests {
49+ createSourceSet = true
50+ enableGameTests = false
51+ enableClientGameTests = true
52+ modId = " wurst_testmod"
53+ username = " Wurst-Bot"
8854}
8955
90- import net.fabricmc.loom.util.Platform
91- tasks. register(' runEndToEndTest' , JavaExec ) {
92- dependsOn remapJar, downloadAssets
93- classpath. from configurations. productionRuntime
94- mainClass = " net.fabricmc.loader.impl.launch.knot.KnotClient"
95- workingDir = file(" run" )
96-
97- doFirst {
98- classpath. from loom. minecraftProvider. minecraftClientJar
99- workingDir. mkdirs()
100-
101- args(
102- " --assetIndex" , loom. minecraftProvider. versionInfo. assetIndex(). fabricId(loom. minecraftProvider. minecraftVersion()),
103- " --assetsDir" , new File (loom. files. userCache, " assets" ). absolutePath,
104- " --gameDir" , workingDir. absolutePath
105- )
106-
107- if (Platform . CURRENT . operatingSystem. isMacOS()) {
108- jvmArgs(" -XstartOnFirstThread" )
109- }
110-
111- jvmArgs(
112- " -Dfabric.addMods=${ configurations.modImplementation.find { it.name.contains('fabric-api') }.absolutePath}${ File.pathSeparator}${ remapJar.archiveFile.get().asFile.absolutePath} " ,
113- " -Dwurst.e2eTest" ,
114- " -Dfabric-tag-conventions-v2.missingTagTranslationWarning=fail" ,
115- " -Dfabric-tag-conventions-v1.legacyTagWarning=fail" ,
116- " -Dmixin.debug.verify=true" ,
117- " -Dmixin.debug.countInjections=true"
118- )
119- }
56+ loom {
57+ accessWidenerPath = file(" src/main/resources/wurst.accesswidener" )
12058}
12159
12260processResources {
@@ -164,13 +102,13 @@ spotless {
164102 eclipse(). configFile(file(" codestyle/formatter.xml" ))
165103 }
166104 format(" licenseHeader" ) {
167- target(" src/*/java/**/*.java" , " src/test/java/**/*.java " )
105+ target(" src/*/java/**/*.java" )
168106 def header_file = file(" codestyle/license_header.txt" )
169107 def delimiter = LicenseHeaderStep . DEFAULT_JAVA_HEADER_DELIMITER
170108 licenseHeaderFile(header_file, delimiter). updateYearWithLatest(true )
171109 }
172110 json {
173- target " src/**/*.json"
111+ target( " src/**/*.json" , " src/**/*.mcmeta " )
174112 gson(). indentWithSpaces(2 ). version(" 2.11.0" )
175113 }
176114}
0 commit comments