Skip to content

Commit

Permalink
fix runtime crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Aug 24, 2023
1 parent fabcef8 commit 2d7786a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ dependencies {
// Runtime
modLocalRuntime("appeng:appliedenergistics2-fabric:$aeVersion")
when (fabricRecipeViewer) {
"rei" -> modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion")
"rei" -> {
modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion") { isTransitive = false }
// disabled transitivity because Dan is not capable of shipping transitive dependencies
// that won't crash the runtime, manual deps now, whooo
modLocalRuntime("dev.architectury:architectury-fabric:6.5.82")
modLocalRuntime("me.shedaniel.cloth:cloth-config-fabric:8.3.103")
}

"jei" -> modLocalRuntime("mezz.jei:jei-$minecraftVersion-fabric:$jeiVersion") { isTransitive = false }
else -> throw GradleException("Invalid recipeViewer value: $fabricRecipeViewer")
}
Expand Down Expand Up @@ -141,3 +148,14 @@ buildConfig {
packageName(modPackage)
useJavaOutput()
}

/**
* force the fabric loader and api versions that are defined in the project
* some mods ship another version which crashes the runtime
*/
configurations.all {
resolutionStrategy {
force("net.fabricmc:fabric-loader:$fabricLoaderVersion")
force("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion+$minecraftVersion")
}
}

0 comments on commit 2d7786a

Please sign in to comment.