generateBuildInfo: register commit as task input — a plain rebuild after a new commit kept the STALE baked sha (task UP-TO-DATE), which made the in-app update check forever report 'update available'
This commit is contained in:
parent
205342bcbc
commit
6efec5702c
1 changed files with 4 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ val generateBuildInfo = tasks.register("generateBuildInfo") {
|
||||||
commandLine("git", "-C", rootProject.projectDir.absolutePath,
|
commandLine("git", "-C", rootProject.projectDir.absolutePath,
|
||||||
"rev-parse", "--short", "HEAD")
|
"rev-parse", "--short", "HEAD")
|
||||||
}.standardOutput.asText.map { it.trim() }
|
}.standardOutput.asText.map { it.trim() }
|
||||||
|
// Register the commit as a task input: without this Gradle calls the
|
||||||
|
// task UP-TO-DATE after a new commit and the jar keeps the STALE baked
|
||||||
|
// commit (the in-app update check then never reports "up to date").
|
||||||
|
inputs.property("commit", commit)
|
||||||
doLast {
|
doLast {
|
||||||
val dir = outDir.get().asFile
|
val dir = outDir.get().asFile
|
||||||
dir.mkdirs()
|
dir.mkdirs()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue