Publish the demoapp to Play open testing on every merge to master - #141
Merged
Conversation
Derive the demoapp version code from the commit count so every upload is accepted without a manual bump: betas get commitCount * 10 and a release build (-Prelease) one more, so a tagged release can follow a beta of the same commit. Betas are named <version>-beta.<count>. The build workflow publishes to the beta track on master merges that touch library or demoapp source. The release workflow now publishes to production instead of beta. Both check out full history for the count. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #141 +/- ##
=========================================
Coverage 71.79% 71.79%
Complexity 1261 1261
=========================================
Files 109 109
Lines 5202 5202
Branches 547 547
=========================================
Hits 3735 3735
Misses 1111 1111
Partials 356 356 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Even codes for betas, odd for releases; the codes only need one spare slot per commit, not nine. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
Every merge to master that touches library or demoapp source now publishes a new demoapp build to the Play open testing (beta) track, the app-side equivalent of the library's snapshot publishing. Tagged releases go to production.
Version scheme
Play requires every upload's version code to exceed all previous ones, so the hand-maintained
theVersionCodeis replaced by a value derived from the commit count indemoapp/build.gradle:commitCount * 2(even)1.6.0-beta.<commitCount>-Prelease)commitCount * 2 + 1(odd)1.6.0The commit count rises with every commit and is identical across workflows, so betas always increase, a tagged release of the same commit lands one above its beta, and the next beta lands above the release. At the current 554 commits that's 1108, well above the 227 on Play today. If the count can't be determined (no git), it falls back to
theVersionCode, which is kept for that purpose.Verified locally:
assembleDebugyields1108 / 1.6.0-beta.554; with-Prelease,1109 / 1.6.0.Workflows
androidplot-core/src/main,demoapp/src/main,demoapp/build.gradleorbuild.gradle, and if so runspublishReleaseApk --track beta. Docs, workflow and test-only changes don't produce a beta.-Prelease --track production. Previously it targeted beta, which would now be redundant.Docs
docs/contributing.mdgains "What happens on merge" and "Releasing" sections describing snapshots, continuous betas, and the tag-driven release.Things to know
demoapp/build.gradle, so it will publish the first continuous beta.v<version>.