11val fabricLoaderVersion = property(" fabric_loader_version" ).toString()
22val fabricApiVersion = property(" fabric_api_version" ).toString()
33val fabricKotlinVersion = property(" fabric_kotlin_version" ).toString()
4+ val architecturyVersion = property(" architectury_version" ).toString()
45
56architectury {
67 platformSetupLoomIde()
@@ -37,7 +38,12 @@ fun DependencyHandlerScope.setupConfigurations() {
3738dependencies {
3839 // Fabric API (Do not touch)
3940 modImplementation(" net.fabricmc:fabric-loader:$fabricLoaderVersion " )
40- modImplementation(" net.fabricmc.fabric-api:fabric-api:$fabricApiVersion " )
41+ modApi(" net.fabricmc.fabric-api:fabric-api:$fabricApiVersion " )
42+
43+ // Remove the following line if you don't want to depend on the API
44+ modApi(" dev.architectury:architectury-fabric:$architecturyVersion " )
45+
46+ // Kotlin for Fabric
4147 modImplementation(" net.fabricmc:fabric-language-kotlin:$fabricKotlinVersion " )
4248
4349 // Add dependencies on the required Kotlin modules.
@@ -49,18 +55,23 @@ dependencies {
4955
5056 // Common (Do not touch)
5157 common(project(" :common" , configuration = " namedElements" )) { isTransitive = false }
52- shadowCommon(project(path = " :common" , configuration = " transformProductionFabric" )) { isTransitive = false }
58+ shadowCommon(project(" :common" , configuration = " transformProductionFabric" )) { isTransitive = false }
5359
5460 // Finish the configuration
5561 setupConfigurations()
5662}
5763
5864tasks {
5965 processResources {
66+ inputs.property(" group" , project.group)
6067 inputs.property(" version" , project.version)
68+
6169 filesMatching(" fabric.mod.json" ) {
6270 expand(getProperties())
63- expand(mutableMapOf (" version" to project.version))
71+ expand(mutableMapOf (
72+ " group" to project.group,
73+ " version" to project.version
74+ ))
6475 }
6576 }
6677
0 commit comments