Skip to content

Commit 2d7786a

Browse files
committed
fix runtime crashes
1 parent fabcef8 commit 2d7786a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

build.gradle.kts

+19-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,14 @@ dependencies {
7979
// Runtime
8080
modLocalRuntime("appeng:appliedenergistics2-fabric:$aeVersion")
8181
when (fabricRecipeViewer) {
82-
"rei" -> modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion")
82+
"rei" -> {
83+
modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion") { isTransitive = false }
84+
// disabled transitivity because Dan is not capable of shipping transitive dependencies
85+
// that won't crash the runtime, manual deps now, whooo
86+
modLocalRuntime("dev.architectury:architectury-fabric:6.5.82")
87+
modLocalRuntime("me.shedaniel.cloth:cloth-config-fabric:8.3.103")
88+
}
89+
8390
"jei" -> modLocalRuntime("mezz.jei:jei-$minecraftVersion-fabric:$jeiVersion") { isTransitive = false }
8491
else -> throw GradleException("Invalid recipeViewer value: $fabricRecipeViewer")
8592
}
@@ -141,3 +148,14 @@ buildConfig {
141148
packageName(modPackage)
142149
useJavaOutput()
143150
}
151+
152+
/**
153+
* force the fabric loader and api versions that are defined in the project
154+
* some mods ship another version which crashes the runtime
155+
*/
156+
configurations.all {
157+
resolutionStrategy {
158+
force("net.fabricmc:fabric-loader:$fabricLoaderVersion")
159+
force("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion+$minecraftVersion")
160+
}
161+
}

0 commit comments

Comments
 (0)