fix forge build

This commit is contained in:
dfsek 2022-06-21 15:38:28 -07:00
parent e1cbb29ae4
commit 1a1000bbef
3 changed files with 38 additions and 3 deletions

View File

@ -4,9 +4,13 @@ plugins {
id("io.github.juuxel.loom-quiltflower") version Versions.Fabric.loomQuiltflower
}
architectury {
fabric()
}
configurations {
val common by creating
create("shadowCommon")
compileClasspath.get().extendsFrom(common)
runtimeClasspath.get().extendsFrom(common)
}
@ -19,7 +23,7 @@ dependencies {
"annotationProcessor"("net.fabricmc:fabric-loom:${Versions.Fabric.loom}")
"common"(project(path = ":platforms:mod-common", configuration = "namedElements")) { isTransitive = false }
"shadowCommon"(project(path = ":platforms:mod-common", configuration = "transformProductionFabric")) { isTransitive = false }
shaded(project(path = ":platforms:mod-common", configuration = "transformProductionFabric")) { isTransitive = false }
minecraft("com.mojang:minecraft:${Versions.Fabric.minecraft}")
mappings("net.fabricmc:yarn:${Versions.Fabric.yarn}:v2")

View File

@ -1,10 +1,30 @@
plugins {
id("dev.architectury.loom") version Versions.Forge.architecuryLoom
id("architectury-plugin") version Versions.Mod.architectutyPlugin
id("io.github.juuxel.loom-quiltflower") version Versions.Fabric.loomQuiltflower
}
architectury {
platformSetupLoomIde()
forge()
}
configurations {
val common by creating
compileClasspath.get().extendsFrom(common)
runtimeClasspath.get().extendsFrom(common)
}
dependencies {
shadedApi(project(":common:implementation:base"))
"common"(project(path = ":platforms:mod-common", configuration = "namedElements")) { isTransitive = false }
shaded(project(path = ":platforms:mod-common", configuration = "transformProductionForge")) { isTransitive = false }
"developmentForge"(project(":platforms:mod-common", configuration = "namedElements")) {
isTransitive = false
}
forge(group = "net.minecraftforge", name = "forge", version = Versions.Forge.forge)
minecraft("com.mojang:minecraft:${Versions.Forge.minecraft}")
@ -17,7 +37,8 @@ loom {
}
forge {
mixinConfigs.set(listOf("terra.forge.mixins.json"))
mixinConfig("terra.common.mixins.json")
mixinConfig("terra.forge.mixins.json")
}
}
@ -34,6 +55,10 @@ tasks {
)
}
}
shadowJar {
exclude("fabric.mod.json")
}
remapJar {
inputFile.set(shadowJar.get().archiveFile)

View File

@ -3,6 +3,12 @@ plugins {
id("architectury-plugin") version Versions.Mod.architectutyPlugin
}
loom {
mixin {
defaultRefmapName.set("terra-common-refmap.json")
}
}
dependencies {
shadedApi(project(":common:implementation:base"))