From a20e8cd55ba8856ffd3542655853f83dd7b64d9b Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 27 Oct 2021 12:25:46 +0200 Subject: [PATCH] Fix the reflections used to make the main buildscript compatible with loom 0.7.3 etc --- build.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c8b06f1..82d0a06 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,14 +62,14 @@ subprojects { } silentMojangMappingsLicense() val refmap = "snowygui-${project.name}-refmap.json" - // The following is used to make this buildscript compatible with architectury-loom 0.7.3, 0.9.X, 0.10.X and higher versions + // The following is used to make this buildscript compatible with architectury-loom 0.7.3, 0.9.X, 0.10.X and higher versions with(javaClass) { if (LoomGradlePlugin.LOOM_VERSION.run { val numberPos = indexOf('.') + 1 substring(numberPos, indexOf('.', numberPos)) }.toShort() < 10) { - getDeclaredMethod("setRefmapName", String::class.java).invoke(this@configure, refmap) - getDeclaredMethod("mixinConfig", String::class.java).invoke(this@configure, "snowygui-${project.name}.mixins.json") + getField("refmapName").set(this@configure, refmap) + getMethod("mixinConfig", Array::class.java).invoke(this@configure, arrayOf("snowygui-${project.name}.mixins.json")) } else { getDeclaredMethod("getMixin").invoke(this@configure).run { javaClass.getDeclaredMethod("getDefaultRefmapName").invoke(this).let { refmapProperty ->