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 ->