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') } }) }