From 399892618f0359296eac6e7a9650ce5207666be4 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:38:11 +0300 Subject: [PATCH] fix: stabilize embedded git SHA for reproducible APKs --- app/build.gradle.kts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e365e0eb..63cd14e3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -26,11 +26,12 @@ android { versionCode = (project.findProperty("versionCode") as? String)?.toIntOrNull() ?: 1 versionName = (project.findProperty("versionName") as? String) ?: "1.0-dev" - // Embed git commit SHA for the About card in Settings + // Use a fixed prefix: git --short varies with the checkout's object graph + // (shallow GitHub Actions vs. full F-Droid clone), breaking reproducible APKs. val gitSha = providers.exec { - commandLine("git", "rev-parse", "--short", "HEAD") - }.standardOutput.asText.get().trim() + commandLine("git", "rev-parse", "HEAD") + }.standardOutput.asText.get().trim().take(7) buildConfigField("String", "GIT_SHA", "\"$gitSha\"") }