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:
avi 2026-09-23 14:59:51 -05:00
commit 6efec5702c

View file

@ -43,6 +43,10 @@ val generateBuildInfo = tasks.register("generateBuildInfo") {
commandLine("git", "-C", rootProject.projectDir.absolutePath,
"rev-parse", "--short", "HEAD")
}.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 {
val dir = outDir.get().asFile
dir.mkdirs()