diff --git a/build.gradle.kts b/build.gradle.kts index 90b4ee1..9128f4f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,14 +15,22 @@ architectury { } subprojects { + lateinit var MappingsDep: Dependency apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "forgified-fabric-loom") apply(plugin = "com.github.johnrengelman.shadow") val shadowC by configurations.creating tasks.withType(ShadowJar::class) { this.configurations = listOf(shadowC) } + extensions.configure("loom") { + MappingsDep = officialMojangMappings() + silentMojangMappingsLicense() + mixinConfig("snowygui-mixins.json") + refmapName = "snowygui-common-refmap.json" + } dependencies { shadowC(kotlin("stdlib-jdk8")) "minecraft"("com.mojang:minecraft:${rootProject.property("minecraft")}") + "mappings"(MappingsDep) } } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index c84dae9..ac2ab16 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -9,12 +9,5 @@ repositories { } dependencies { compileOnly("org.spongepowered:mixin:0.8-SNAPSHOT") - mappings(loom.officialMojangMappings()) -} - -loom { - silentMojangMappingsLicense() - mixinConfig("snowygui-mixins.json") - refmapName = "snowygui-common-refmap.json" } diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 362de68..c8cd289 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -13,7 +13,6 @@ object Groups { architectury { platformSetupLoomIde(); fabric() } dependencies { - mappings(loom.officialMojangMappings()) modApi("${Groups.Fabric}:fabric-loader:${rootProject.property("fabric_loader_version")}") modApi("${Groups.FabricApi}:fabric-resource-loader-v0:${rootProject.property("fabric_resource_loader_version")}") include("${Groups.FabricApi}:fabric-resource-loader-v0:${rootProject.property("fabric_resource_loader_version")}") { isTransitive = false } @@ -23,5 +22,5 @@ dependencies { implementation(project(path = ":common")) { isTransitive = false } add("developmentFabric", project(path = ":common")) { isTransitive = false } shadowC(project(path = ":common", configuration = "transformProductionFabric")) { isTransitive = false } -}; loom { silentMojangMappingsLicense() } +} diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 48cdeaa..54ac740 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -1,8 +1,7 @@ architectury { platformSetupLoomIde(); forge() } dependencies { - mappings(loom.officialMojangMappings()) forge("net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.property("forge_version")}") implementation(project(path = ":common")) { isTransitive = false } add("developmentForge", project(path = ":common")) { isTransitive = false } shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false } -}; loom { silentMojangMappingsLicense(); useFabricMixin = true } +}; loom { useFabricMixin = true }