From 04fe933f4c24817100f3101f088accf55a621f8a Mon Sep 17 00:00:00 2001 From: isxander Date: Thu, 11 Apr 2024 18:43:06 +0100 Subject: Extremely fragile and broken multiversion build with stonecutter --- settings.gradle.kts | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'settings.gradle.kts') diff --git a/settings.gradle.kts b/settings.gradle.kts index ed41045..fed4fd6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,33 +1,38 @@ +import dev.kikugie.stonecutter.gradle.StonecutterSettings + pluginManagement { repositories { mavenCentral() gradlePluginPortal() - maven("https://maven.fabricmc.net") - maven("https://maven.architectury.dev/") - maven("https://maven.neoforged.net/releases") - maven("https://maven.quiltmc.org/repository/release") + maven("https://maven.fabricmc.net/") + maven("https://maven.architectury.dev") + maven("https://maven.neoforged.net/releases/") + maven("https://maven.minecraftforge.net/") + maven("https://maven.kikugie.dev/releases") } } -dependencyResolutionManagement { - versionCatalogs { - create("libs") - } +plugins { + id("dev.kikugie.stonecutter") version "0.3.2" } -rootProject.name = "YetAnotherConfigLib" - -val enabledLoaders = settings.extra.properties["loaders"].toString().split(",").map { it.trim() } - -include("common") -include("test-common") +extensions.configure { + kotlinController(true) + centralScript("build.gradle.kts") + shared { + fun mc(mcVersion: String, name: String = mcVersion, common: Boolean = true, loaders: Iterable) { + for (loader in loaders) { + vers("$name-$loader", mcVersion) + } + if (common) { + vers("$name-common", mcVersion) + } + } -if ("fabric" in enabledLoaders) { - include("fabric") - include("test-fabric") -} - -if ("neoforge" in enabledLoaders) { - include("neoforge") - include("test-neoforge") + mc("1.20.4", loaders = listOf("fabric", "neoforge")) + mc("1.20.1", loaders = listOf("fabric", "forge")) + mc("1.20.5-beta.1", name = "1.20.5-pre1", loaders = listOf("fabric")) + } + create(rootProject) } +rootProject.name = "YetAnotherConfigLib" -- cgit