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:
parent
3d689b3367
commit
33f7d4bd9f
1 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue