From 6efec5702c474838b6c487ae9f4b341606b382e0 Mon Sep 17 00:00:00 2001 From: avi Date: Wed, 23 Sep 2026 14:59:51 -0500 Subject: [PATCH] =?UTF-8?q?generateBuildInfo:=20register=20commit=20as=20t?= =?UTF-8?q?ask=20input=20=E2=80=94=20a=20plain=20rebuild=20after=20a=20new?= =?UTF-8?q?=20commit=20kept=20the=20STALE=20baked=20sha=20(task=20UP-TO-DA?= =?UTF-8?q?TE),=20which=20made=20the=20in-app=20update=20check=20forever?= =?UTF-8?q?=20report=20'update=20available'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 82d742c..5e2b5e3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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()