Repository navigation
Derive Android app versions from root VERSION - #413
Merged
Merged
Conversation
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android still hardcodes
0.2.0-dev/ version code2, so a root-only product version change leaves its APK behind. Read rootVERSIONthrough a tracked Gradle file input and deriveversionCodeasmajor * 1000000 + minor * 1000 + patch. The current version becomes0.2.6/2006, with-debugpreserved for debug builds.Bound major to 0–2099 and minor/patch to 0–999, and reject zero, missing or unsupported versions. This preserves numeric release ordering within the supported range and stays below the Google Play code limit. Rebuilds retain their code; every published Android release needs a greater product version.
Root-only version edits now select the Android build/unit checks. CI exercises root changes with Gradle configuration-cache reuse and checks the assembled APK's binary manifest against root
VERSION. Update the version policy and release runbook.Validation: debug APK assembly and Android unit tests pass; debug/release manifests contain
0.2.6-debug/0.2.6and code2006; the APK verifier passes and rejects a wrong suffix. Gradle regression cases cover patch/minor/major changes, cache reuse/invalidation, bounds and missing/malformed input. All 19 release tests, core/contract boundary checks, workflow YAML parsing and diff checks pass.Continues #130 and #122 after #410 and #411. Keep #130 open for the final consumer/artifact audit; this PR does not publish a release or change root
VERSION.