From 9acfef55ab01005e878e644f615d41cb3d6195db Mon Sep 17 00:00:00 2001 From: kikugie Date: Sat, 31 Aug 2024 10:29:11 +0200 Subject: [PATCH] Update properties --- build.gradle.kts | 30 ++++++++++++------------ gradle.properties | 5 +++- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 8 +++---- stonecutter.gradle.kts | 4 ++-- versions/1.21.1/gradle.properties | 6 +++++ versions/1.21/gradle.properties | 6 ----- 7 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 versions/1.21.1/gradle.properties delete mode 100644 versions/1.21/gradle.properties diff --git a/build.gradle.kts b/build.gradle.kts index 45496bc..df0cfba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,27 +37,27 @@ loom { } repositories { - exclusiveContent { - forRepository { maven("https://www.cursemaven.com") { name = "CurseForge" } } - filter { includeGroup("curse.maven") } - } - exclusiveContent { - forRepository { maven("https://api.modrinth.com/maven") { name = "Modrinth" } } - filter { includeGroup("maven.modrinth") } + fun strictMaven(url: String, alias: String, vararg groups: String) = exclusiveContent { + forRepository { maven(url) { name = alias } } + filter { groups.forEach(::includeGroup) } } + strictMaven("https://www.cursemaven.com", "CurseForge", "curse.maven") + strictMaven("https://api.modrinth.com/maven", "Modrinth", "maven.modrinth") } dependencies { - fun fapi(vararg modules: String) { - modules.forEach { fabricApi.module(it, deps["fapi"]) } + fun fapi(vararg modules: String) = modules.forEach { + modImplementation(fabricApi.module(it, deps["fabric_api"])) } - minecraft("com.mojang:minecraft:${mcVersion}") - mappings("net.fabricmc:yarn:${mcVersion}+build.${deps["yarn_build"]}:v2") + minecraft("com.mojang:minecraft:$mcVersion") + mappings("net.fabricmc:yarn:$mcVersion+build.${deps["yarn_build"]}:v2") modImplementation("net.fabricmc:fabric-loader:${deps["fabric_loader"]}") - modLocalRuntime("net.fabricmc.fabric-api:fabric-api:${deps["fabric_api"]}") - vineflowerDecompilerClasspath("org.vineflower:vineflower:1.10.1") + fapi( + // Add modules from https://github.com/FabricMC/fabric + "fabric-lifecycle-events-v1", + ) } loom { @@ -68,7 +68,7 @@ loom { } runConfigs.all { - ideConfigGenerated(stonecutter.current.isActive) + ideConfigGenerated(true) vmArgs("-Dmixin.debug.export=true") runDir = "../../run" } @@ -76,7 +76,7 @@ loom { java { withSourcesJar() - val java = if (stonecutter.compare(mcVersion, "1.20.6") >= 0) JavaVersion.VERSION_21 else JavaVersion.VERSION_17 + val java = if (stonecutter.eval(mcVersion, ">=1.20.6")) JavaVersion.VERSION_21 else JavaVersion.VERSION_17 targetCompatibility = java sourceCompatibility = java } diff --git a/gradle.properties b/gradle.properties index b112fff..9d5d15b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,9 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G org.gradle.parallel=true +org.gradle.caching=true +org.gradle.caching.debug=false +org.gradle.configureondemand=true # Mod properties mod.version=0.1.0 @@ -16,7 +19,7 @@ mod.mc_title=[VERSIONED] mod.mc_targets=[VERSIONED] # Global dependencies -deps.fabric_loader=0.15.11 +deps.fabric_loader=0.16.3 # Versioned dependencies deps.yarn_build=[VERSIONED] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle.kts b/settings.gradle.kts index ef2fa3b..4e754da 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,3 @@ -import dev.kikugie.stonecutter.StonecutterSettings - pluginManagement { repositories { mavenCentral() @@ -9,15 +7,15 @@ pluginManagement { } plugins { - id("dev.kikugie.stonecutter") version "0.4.3" + id("dev.kikugie.stonecutter") version "0.4.4" } -extensions.configure { +stonecutter { kotlinController = true centralScript = "build.gradle.kts" shared { - versions("1.20.1", "1.20.4", "1.20.6", "1.21") + versions("1.20.1", "1.20.4", "1.20.6", "1.21.1") } create(rootProject) } diff --git a/stonecutter.gradle.kts b/stonecutter.gradle.kts index f657724..429fe2b 100644 --- a/stonecutter.gradle.kts +++ b/stonecutter.gradle.kts @@ -1,8 +1,8 @@ plugins { id("dev.kikugie.stonecutter") id("fabric-loom") version "1.7-SNAPSHOT" apply false - //id("dev.kikugie.j52j") version "1.0" apply false // Enables asset processing by writing json5 files - //id("me.modmuss50.mod-publish-plugin") version "0.5.+" apply false // Publishes builds to hosting websites + //id("dev.kikugie.j52j") version "1.0.2" apply false // Enables asset processing by writing json5 files + //id("me.modmuss50.mod-publish-plugin") version "0.7.+" apply false // Publishes builds to hosting websites } stonecutter active "1.20.1" /* [SC] DO NOT EDIT */ diff --git a/versions/1.21.1/gradle.properties b/versions/1.21.1/gradle.properties new file mode 100644 index 0000000..83e28bb --- /dev/null +++ b/versions/1.21.1/gradle.properties @@ -0,0 +1,6 @@ +deps.yarn_build=3 +deps.fabric_api=0.103.0+1.21.1 + +mod.mc_dep=>=1.21 <=1.21.1 +mod.mc_title=1.21.1 +mod.mc_targets=1.21 1.21.1 \ No newline at end of file diff --git a/versions/1.21/gradle.properties b/versions/1.21/gradle.properties deleted file mode 100644 index 92da6c1..0000000 --- a/versions/1.21/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -deps.yarn_build=9 -deps.fabric_api=0.100.8+1.21 - -mod.mc_dep=1.21 -mod.mc_title=1.21 -mod.mc_targets=1.21 \ No newline at end of file