From d09f3d1447964fb2630dedba1a9bc4ebe40a2c92 Mon Sep 17 00:00:00 2001 From: rhysdh540 Date: Tue, 24 Oct 2023 15:26:02 -0400 Subject: [PATCH] pls work :( --- build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index acb104e..4898e92 100755 --- a/build.gradle +++ b/build.gradle @@ -89,10 +89,14 @@ def setup() { subs.remove(rootProject.project(':common')) subs.remove(rootProject.project(':forge')) - subs.each { - it.buildDir.toPath().resolve('libs').toFile().listFiles().each { file -> - File newFile = new File(file.parent, file.name.replace('.jar', "-${file.name}.jar")) - java.nio.file.Files.copy(file.toPath(), java.nio.file.Path.of("artifacts/unmerged/${rootProject.mcVer}", newFile.name)) + with copySpec { + subs.each { p -> + p.buildDir.toPath().resolve('libs').toFile().listFiles().each { file -> + File newFile = new File(file.parent, file.name.replace('.jar', "-${p.name}.jar")) + file.renameTo newFile + from newFile + into "artifacts/unmerged/${rootProject.mcVer}" + } } }