From a297cdb79a8968d72c487ea03f4b310e634d61d2 Mon Sep 17 00:00:00 2001 From: Ran <43445785+RanCraftPlayz@users.noreply.github.com> Date: Sun, 28 Nov 2021 09:40:54 +0600 Subject: [PATCH] Fix gradle issues --- build.gradle | 4 ++++ common/build.gradle | 6 ------ fabric/build.gradle | 2 +- forge/build.gradle | 3 +++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index ebaba86da..7dc568576 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,10 @@ subprojects { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" // The following line declares the mojmap mappings mappings loom.officialMojangMappings() + + // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies + // Do NOT use other classes from fabric loader unless working with fabric + modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" } } diff --git a/common/build.gradle b/common/build.gradle index fc8e90818..0002c219a 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,9 +1,3 @@ -dependencies { - // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies - // Do NOT use other classes from fabric loader - modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" -} - loom { accessWidenerPath.set(file("src/main/resources/lod.accesswidener")) } diff --git a/fabric/build.gradle b/fabric/build.gradle index f8d90f8fd..55365cd28 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -68,7 +68,7 @@ task copyAccessWidenerAtRuntime(type: Copy) { } task deleteAccessWidenerAtRuntime(type: Delete) { - file("build/resources/main/lod.accesswidener") + delete file("build/resources/main/lod.accesswidener") } runClient { diff --git a/forge/build.gradle b/forge/build.gradle index 102a8625e..44ffab118 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -43,6 +43,9 @@ dependencies { } shadowJar { + dependencies { + exclude(dependency("net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}")) + } exclude "fabric.mod.json" configurations = [project.configurations.shadowMe] relocate 'org.tukaani', 'shaded.tukaani'