From b0b129f679de4c9c8800dbd1facf578c0209307c Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 14 May 2021 20:41:44 +0100 Subject: [PATCH] fixes for reproducibility on windows --- build.gradle | 5 ++++- gui/build.gradle | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 09f9968d..68d0e4d6 100644 --- a/build.gradle +++ b/build.gradle @@ -44,6 +44,7 @@ subprojects { } } import java.util.jar.* +import java.nio.file.* void stripJar(File file) { if (file.getName().endsWith('.tar')) return @@ -59,7 +60,9 @@ void stripJar(File file) { out << jf.getInputStream(it) } out.finish() + jf.close() } - newFile.renameTo file + Files.copy(newFile.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING) + newFile.delete() } diff --git a/gui/build.gradle b/gui/build.gradle index ef663579..0f576a96 100644 --- a/gui/build.gradle +++ b/gui/build.gradle @@ -160,21 +160,24 @@ task griffonManifest { def controllerFile = new File(manifest, "griffon.core.artifact.GriffonController") controllerFile.withPrintWriter("US-ASCII", {writer -> controllers.each {controller -> - writer.println(controller) + writer.print(controller) + writer.print('\n') } }) def modelsFile = new File(manifest, "griffon.core.artifact.GriffonModel") modelsFile.withPrintWriter("US-ASCII", {writer -> models.each {model -> - writer.println(model) + writer.print(model) + writer.print('\n') } }) def viewsFile = new File(manifest, "griffon.core.artifact.GriffonView") viewsFile.withPrintWriter("US-ASCII", {writer -> views.each {view -> - writer.println(view) + writer.print(view) + writer.print('\n') } }) }