1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Don’t break incremental compilation in the build file.

This commit is contained in:
Cedric Beust 2017-03-15 10:53:45 -07:00
parent 3d689b3367
commit 33f7d4bd9f

View file

@ -238,9 +238,12 @@ fun taskCopyVersionForWrapper(project: Project) : TaskResult {
File(toString).mkdirs()
val from = Paths.get("src/main/resources/kobalt.properties")
val to = Paths.get("$toString/kobalt.properties")
Files.copy(from,
to,
StandardCopyOption.REPLACE_EXISTING)
// Only copy if necessary so we don't break incremental compilation
if (from.toFile().readLines() != to.toFile().readLines()) {
Files.copy(from,
to,
StandardCopyOption.REPLACE_EXISTING)
}
}
return TaskResult()
}