@@ -11,11 +11,18 @@ base.archivesName.set("${base.archivesName.get()}-forge")
1111
1212loom {
1313 accessWidenerPath.set(project(" :common" ).loom.accessWidenerPath)
14+
1415 forge {
1516 convertAccessWideners = true
1617 extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
1718 mixinConfig(" lambda.mixins.common.json" )
1819 }
20+
21+ mods {
22+ register(" forge" ) {
23+ sourceSet(" main" , project(" :forge" ))
24+ }
25+ }
1926}
2027
2128repositories {
@@ -49,19 +56,18 @@ dependencies {
4956 forge(" net.minecraftforge:forge:$forgeVersion " )
5057
5158 // Add dependencies on the required Kotlin modules.
52- includeLib(" io.github.llamalad7:mixinextras-forge: $mixinExtrasVersion " )
53- includeLib(" thedarkcolour:kotlinforforge: $kotlinForgeVersion " )
59+ includeLib(" thedarkcolour:kotlinforforge: $kotlinForgeVersion " ) { isTransitive = false }
60+ includeLib(" io.github.llamalad7:mixinextras-forge: $mixinExtrasVersion " ) { isTransitive = false }
5461
5562 // Add mods to the mod jar
56- // includeMod(...)
63+ includeMod(" thedarkcolour:kotlinforforge:$kotlinForgeVersion " ) // Both a library and a mod
64+
65+ compileOnly(kotlin(" stdlib" )) // Hacky fix https://github.com/thedarkcolour/KotlinForForge/issues/93
5766
5867 // Common (Do not touch)
59- common (project(" :common" , configuration = " namedElements" )) { isTransitive = false }
68+ implementation (project(" :common" , configuration = " namedElements" )) { isTransitive = false } // We cannot common here because it is treated as a different mod and forge will panic
6069 shadowCommon(project(path = " :common" , configuration = " transformProductionForge" )) { isTransitive = false }
6170
62- // KFF Fix
63- compileOnly(kotlin(" stdlib" )) // Hacky fix https://github.com/thedarkcolour/KotlinForForge/issues/93
64-
6571 // Finish the configuration
6672 setupConfigurations()
6773}
0 commit comments