Skip to content

Publish the demoapp to Play open testing on every merge to master - #141

Merged
halfhp merged 2 commits into
masterfrom
continuous-beta
Sep 7, 2026
Merged

Publish the demoapp to Play open testing on every merge to master#141
halfhp merged 2 commits into
masterfrom
continuous-beta

Conversation

@halfhp

@halfhp halfhp commented Sep 7, 2026

Copy link
Copy Markdown
Owner

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 theVersionCode is replaced by a value derived from the commit count in demoapp/build.gradle:

Build Version code Version name
Beta (default) commitCount * 2 (even) 1.6.0-beta.<commitCount>
Release (-Prelease) commitCount * 2 + 1 (odd) 1.6.0

The 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: assembleDebug yields 1108 / 1.6.0-beta.554; with -Prelease, 1109 / 1.6.0.

Workflows

  • build.yml: after the signed build on master, a step checks whether the merge touched androidplot-core/src/main, demoapp/src/main, demoapp/build.gradle or build.gradle, and if so runs publishReleaseApk --track beta. Docs, workflow and test-only changes don't produce a beta.
  • release.yml: builds and publishes with -Prelease --track production. Previously it targeted beta, which would now be redundant.
  • Both workflows check out full history so the commit count is available.

Docs

docs/contributing.md gains "What happens on merge" and "Releasing" sections describing snapshots, continuous betas, and the tag-driven release.

Things to know

  • Merging this PR itself touches demoapp/build.gradle, so it will publish the first continuous beta.
  • Play reviews each testing-track upload before testers see it; a newer upload supersedes one still in review.
  • Production promotion remains a deliberate act: push v<version>.

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-commenter

codecov-commenter commented Sep 7, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.79%. Comparing base (2734a46) to head (bc50b1f).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@halfhp
halfhp merged commit 066828c into master Sep 7, 2026
1 check passed
@halfhp
halfhp deleted the continuous-beta branch September 7, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants