From 2cf6526b5c21ca96c860accbeb725c6eaa92de4a Mon Sep 17 00:00:00 2001 From: Enginex0 Date: Sat, 11 Jul 2026 13:50:21 +0100 Subject: [PATCH] fix(build): floor versionCode above shipped 298 The 2026-07-08 public-release history scrub (0f1143a) rewrote history and dropped `git rev-list --count` below the build number already shipped to testers (298), so post-scrub builds (291, 294) read as downgrades. Add a floor offset so versionCode clears 298 and stays monotonic across the rewrite: the current count maps to 300, and each later commit still increments by one. --- app/build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 64d484f..d204c27 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,7 +28,14 @@ abstract class GitExecutor @Inject constructor(private val execOperations: ExecO // Instantiate the helper class using Gradle's object factory val gitExecutor = objects.newInstance(GitExecutor::class.java) -val gitCommitCount = gitExecutor.execute("git rev-list HEAD --count", rootDir).toInt() +// versionCode = git commit count + floor offset. The 2026-07-08 public-release +// history scrub (0f1143a) rewrote history and dropped the raw commit count below +// the build number already shipped to testers (298), so post-scrub counts read as +// downgrades. The floor offset lifts versionCode back above that peak and keeps it +// monotonic across the rewrite; each later commit still bumps it by one. +val versionCodeFloorOffset = 5 +val gitCommitCount = + gitExecutor.execute("git rev-list HEAD --count", rootDir).toInt() + versionCodeFloorOffset val gitCommitHash = gitExecutor.execute("git rev-parse --verify --short HEAD", rootDir) val verName = "v6.0.1"