From f9f9643b07ed4ff5d8714cf5c6bc5707b61251c1 Mon Sep 17 00:00:00 2001 From: Alexander01998 Date: Fri, 15 Nov 2024 15:14:43 +0100 Subject: [PATCH] Fix file type in publishMods --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1aa2b96..bf7d788 100644 --- a/build.gradle +++ b/build.gradle @@ -269,10 +269,10 @@ spotless { } publishMods { - file = tasks.named("renameJarJar").map { task -> + file = tasks.named("renameJarJar").flatMap { task -> def libsDir = layout.buildDirectory.dir("libs").get().asFile def jarFiles = libsDir.listFiles().findAll { it.name.endsWith(".jar") } - jarFiles[0] + layout.file(providers.provider { jarFiles[0] }) } def versionString = project.version as String def ghVersion = "v" + versionString.substring(0, versionString.indexOf("-MC"))