From e309341810a0784fc546befacb265f3b7f23fee1 Mon Sep 17 00:00:00 2001 From: Fourmisain <8464472+Fourmisain@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:07:14 +0200 Subject: [PATCH] update to loom 1.7 --- build.gradle | 14 +++++++------- .../config/FallingLeavesConfigV0.java | 4 +++- .../fallingleaves/init/Leaves.java | 1 - .../mixin/GsonConfigSerializerMixin.java | 2 -- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 818e48a..848a233 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.6-SNAPSHOT' + id 'fabric-loom' version '1.7-SNAPSHOT' id 'maven-publish' id 'com.matthewprenger.cursegradle' version '1.4.0' id 'com.modrinth.minotaur' version '2.+' @@ -82,7 +82,7 @@ publishing { } def changesMd = file('changes.md').getText('UTF-8') -def toList = (String s) -> s.split(',').collect{ it.trim() } +def toList = (String s) -> s.split(',').collect { it.trim() } def gameVersionList = toList(project.game_version_list) modrinth { @@ -98,8 +98,8 @@ modrinth { gameVersions = gameVersionList loaders = ['fabric'] dependencies { - toList(project.modrinth_dependencies).each{ required.project(it) } - toList(project.modrinth_optional_dependencies).each{ optional.project(it) } + toList(project.modrinth_dependencies).each { required.project(it) } + toList(project.modrinth_optional_dependencies).each { optional.project(it) } } } } @@ -115,11 +115,11 @@ curseforge { changelog = changesMd addGameVersion 'Fabric' - gameVersionList.each{ addGameVersion(it) } + gameVersionList.each { addGameVersion(it) } relations { - toList(project.curseforge_dependencies).each{ requiredDependency(it) } - toList(project.curseforge_optional_dependencies).each{ optionalDependency(it) } + toList(project.curseforge_dependencies).each { requiredDependency(it) } + toList(project.curseforge_optional_dependencies).each { optionalDependency(it) } } mainArtifact(remapJar.archiveFile.get().asFile) { displayName = "${project.mod_version} [${versionRange(gameVersionList)}]" diff --git a/src/main/java/randommcsomethin/fallingleaves/config/FallingLeavesConfigV0.java b/src/main/java/randommcsomethin/fallingleaves/config/FallingLeavesConfigV0.java index 9388c97..d7eed23 100644 --- a/src/main/java/randommcsomethin/fallingleaves/config/FallingLeavesConfigV0.java +++ b/src/main/java/randommcsomethin/fallingleaves/config/FallingLeavesConfigV0.java @@ -1,6 +1,8 @@ package randommcsomethin.fallingleaves.config; -import java.util.*; +import java.util.Collections; +import java.util.Map; +import java.util.Set; /** Old v0 config format used in versions 1.0 to 1.4 */ @SuppressWarnings({"FieldMayBeFinal", "CanBeFinal"}) diff --git a/src/main/java/randommcsomethin/fallingleaves/init/Leaves.java b/src/main/java/randommcsomethin/fallingleaves/init/Leaves.java index 7cbec67..8ec7add 100644 --- a/src/main/java/randommcsomethin/fallingleaves/init/Leaves.java +++ b/src/main/java/randommcsomethin/fallingleaves/init/Leaves.java @@ -25,7 +25,6 @@ import randommcsomethin.fallingleaves.util.LeafUtil; import randommcsomethin.fallingleaves.util.TextureCache; -import java.util.HashMap; import java.util.IdentityHashMap; import java.util.Map; diff --git a/src/main/java/randommcsomethin/fallingleaves/mixin/GsonConfigSerializerMixin.java b/src/main/java/randommcsomethin/fallingleaves/mixin/GsonConfigSerializerMixin.java index 3884e77..9c9a0fa 100644 --- a/src/main/java/randommcsomethin/fallingleaves/mixin/GsonConfigSerializerMixin.java +++ b/src/main/java/randommcsomethin/fallingleaves/mixin/GsonConfigSerializerMixin.java @@ -3,8 +3,6 @@ import com.llamalad7.mixinextras.injector.ModifyReturnValue; import me.shedaniel.autoconfig.ConfigData; import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At;