From bf5ad82b3c3589d3aa0674f87d47668079dbc81d Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Tue, 25 Apr 2017 12:05:07 +0200 Subject: [PATCH] Only recreate dotty-compiler jar if it changed Previously `dotty-compiler/packageBin` always recreated the jar because we overwrote the compiler.properties ressource file. --- project/Build.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index abe8f52deb52..1851ba2a3a29 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -275,7 +275,11 @@ object Build { resourceGenerators in Compile += Def.task { val file = (resourceManaged in Compile).value / "compiler.properties" val contents = s"version.number=${version.value}" - IO.write(file, contents) + + if (!(file.exists && IO.read(file) == contents)) { + IO.write(file, contents) + } + Seq(file) }.taskValue,