From 2d7786af1b9d810dcccfb57c61665df1d97e4377 Mon Sep 17 00:00:00 2001 From: Relentless Date: Thu, 24 Aug 2023 21:19:45 +0200 Subject: [PATCH] fix runtime crashes --- build.gradle.kts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 79d8c9a..598d98a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") } @@ -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") + } +}