Repository navigation
fix(android): stop deriving versionCode from the Unix timestamp - #158
Open
1technophile wants to merge 1 commit into
Open
1technophile wants to merge 1 commit into
1technophile wants to merge 1 commit into
Conversation
Play now rejects the release with "This release's version code is significantly higher than your previous version code". versionCode was the build time in Unix seconds (~1.79e9 in late 2026), which climbs ~86 400 a day and reaches Android's 2 100 000 000 ceiling in mid-2036, after which the app could never be updated again. CI builds now use 1800000000 + GITHUB_RUN_NUMBER: the base is above every timestamp code already issued (and stays above them until January 2027), so the switch never goes backwards, and each upload adds 1 instead of a day's worth of seconds. Local builds have no run number and keep the timestamp; they are never uploaded. The mobile workflow is at run 435, so the next CI build will be about 1800000436. Verified with local release builds read back with aapt2: GITHUB_RUN_NUMBER=157 gives versionCode 1800000157; without it the code is the current timestamp as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Description:
Play now rejects the release with "This release's version code is significantly higher than your previous version code". versionCode was the build time in Unix seconds (~1.79e9 in late 2026), which climbs ~86 400 a day and reaches Android's 2 100 000 000 ceiling in mid-2036, after which the app could never be updated again.
CI builds now use 1800000000 + GITHUB_RUN_NUMBER: the base is above every timestamp code already issued (and stays above them until January 2027), so the switch never goes backwards, and each upload adds 1 instead of a day's worth of seconds. Local builds have no run number and keep the timestamp; they are never uploaded.
The mobile workflow is at run 435, so the next CI build will be about 1800000436.
Verified with local release builds read back with aapt2: GITHUB_RUN_NUMBER=157 gives versionCode 1800000157; without it the code is the current timestamp as before.
Checklist: