1- val forgeVersion = property(" forge_version" ).toString()
2- val mixinExtrasVersion = property(" mixinextras_version" ).toString()
3- val kotlinForgeVersion = property(" kotlin_forge_version" ).toString()
1+ val minecraftVersion: String by project
2+ val forgeVersion: String by project
3+ val mixinExtrasVersion: String by project
4+ val kotlinForgeVersion: String by project
45
5- base.archivesName.set( " ${base.archivesName.get()} -forge" )
6+ base.archivesName = " ${base.archivesName.get()} -forge"
67
78architectury {
89 platformSetupLoomIde()
@@ -13,14 +14,26 @@ loom {
1314 accessWidenerPath.set(project(" :common" ).loom.accessWidenerPath)
1415
1516 forge {
17+ // This is required to convert the access wideners to the forge
18+ // format, access transformers.
1619 convertAccessWideners = true
17- extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
20+
21+ // Add the mod's mixins to the list of mixins to be applied.
22+ // In the extraordinary case that you need to add mixins for
23+ // different mod loaders, you can add them using the
24+ // `extraAccessWideners` property.
25+ // And then add them to the `mixinConfig` function.
1826 mixinConfig(" lambda.mixins.common.json" )
1927 }
2028}
2129
2230repositories {
23- maven(" https://cursemaven.com" )
31+ // You can add more repositories here if you plan
32+ // on using environment-specific dependencies.
33+ // If you simply want to add a global repository,
34+ // you can add it to the `settings.gradle.kts` file
35+ // in the base of the project and gradle will do the
36+ // rest for you.
2437 maven(" https://thedarkcolour.github.io/KotlinForForge/" )
2538}
2639
@@ -58,7 +71,7 @@ fun DependencyHandlerScope.setupConfigurations() {
5871
5972dependencies {
6073 // Forge API
61- forge(" net.minecraftforge:forge:$forgeVersion " )
74+ forge(" net.minecraftforge:forge:$minecraftVersion - $ forgeVersion" )
6275
6376 // Add dependencies on the required Kotlin modules.
6477 includeLib(" org.reflections:reflections:0.10.2" )
@@ -84,10 +97,6 @@ dependencies {
8497}
8598
8699tasks {
87- remapJar {
88- injectAccessWidener = true
89- }
90-
91100 sourceSets.forEach {
92101 val dir = layout.buildDirectory.dir(" sourcesSets/${it.name} " )
93102 it.output.setResourcesDir(dir)
0 commit comments