2022-05-31 10:50:46 -04:00
|
|
|
val minecraftVersion: String by project
|
|
|
|
val fabricLoaderVersion: String by project
|
2023-02-01 14:43:30 -05:00
|
|
|
val fabricApiVersion: String by project
|
|
|
|
val fabricRecipeViewer: String by project
|
2022-05-31 17:19:29 -04:00
|
|
|
val reiVersion: String by project
|
2022-09-16 14:13:01 -04:00
|
|
|
val jeiVersion: String by project
|
2022-09-24 14:05:47 -04:00
|
|
|
val kubejsVersion: String by project
|
2022-05-31 10:50:46 -04:00
|
|
|
|
2022-09-24 14:05:47 -04:00
|
|
|
plugins {
|
2023-02-01 14:43:30 -05:00
|
|
|
id("com.github.johnrengelman.shadow") version ("7.1.2")
|
2022-05-31 10:50:46 -04:00
|
|
|
}
|
|
|
|
|
2023-02-01 14:43:30 -05:00
|
|
|
architectury {
|
|
|
|
platformSetupLoomIde()
|
|
|
|
fabric()
|
2022-05-31 10:50:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
loom {
|
2023-02-01 14:43:30 -05:00
|
|
|
if (project.findProperty("enableAccessWidener") == "true") { // Optional property for `gradle.properties` to enable access wideners.
|
|
|
|
accessWidenerPath.set(project(":Common").loom.accessWidenerPath)
|
|
|
|
println("Access widener enabled for project ${project.name}. Access widener path: ${loom.accessWidenerPath.get()}")
|
2022-09-24 14:05:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-01 14:43:30 -05:00
|
|
|
val common by configurations
|
|
|
|
val shadowCommon by configurations
|
2022-09-24 14:05:47 -04:00
|
|
|
dependencies {
|
|
|
|
modImplementation("net.fabricmc:fabric-loader:$fabricLoaderVersion")
|
2023-02-01 14:43:30 -05:00
|
|
|
modApi("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion+$minecraftVersion")
|
|
|
|
|
|
|
|
common(project(":Common", "namedElements")) { isTransitive = false }
|
|
|
|
shadowCommon(project(":Common", "transformProductionFabric")) { isTransitive = false }
|
2022-09-24 14:05:47 -04:00
|
|
|
|
2023-02-01 14:43:30 -05:00
|
|
|
modCompileOnly(modLocalRuntime("dev.latvian.mods:kubejs-fabric:$kubejsVersion")!!)
|
2022-09-27 12:10:51 -04:00
|
|
|
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:$reiVersion") // required for common rei plugin
|
2022-11-30 14:49:18 -05:00
|
|
|
compileOnly("me.shedaniel:REIPluginCompatibilities-forge-annotations:9.+") // required to disable rei compat layer on jei plugin
|
|
|
|
testCompileOnly("me.shedaniel:REIPluginCompatibilities-forge-annotations:9.+") // don't question this, it's required for compiling
|
2022-09-24 14:05:47 -04:00
|
|
|
modCompileOnly("mezz.jei:jei-$minecraftVersion-fabric:$jeiVersion") // required for common jei plugin and mixin
|
2023-02-01 14:43:30 -05:00
|
|
|
when (fabricRecipeViewer) { // runtime only
|
2022-09-24 14:05:47 -04:00
|
|
|
"rei" -> modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion")
|
|
|
|
"jei" -> modLocalRuntime("mezz.jei:jei-$minecraftVersion-fabric:$jeiVersion")
|
|
|
|
else -> throw GradleException("Invalid fabricRecipeViewer value: $fabricRecipeViewer")
|
|
|
|
}
|
2022-05-31 10:50:46 -04:00
|
|
|
}
|