fix: derive version from git tag at release time#25
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 46 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
The APK published under release tag
1.2.1shippedversionName='1.2.0'becauseversionNamewas hardcoded inbuild.gradle.ktsand never bumped when tagging. Consumers that compare a device's reportedversionNameagainst the release tag (e.g. mobilecli'sagent install) never match, causing repeated reinstalls.Fix
versionNamefrom a Gradle property (-PversionName=x.y.z) and computeversionCodefrom it; non-release builds fall back to0.0.0-dev.1.2.2shipsversionName='1.2.2'.Verification
Built locally with
-PversionName=1.2.1:Summary by cubic
Derive APK
versionNameandversionCodefrom the git tag during release builds, so the published APK matches the release tag. Prevents reinstall loops in tools that compare the deviceversionNameto the release tag.-PversionName; defaults to0.0.0-devfor non-release builds.versionCodecomputed fromversionName(e.g., 1.2.1 -> 10201), with a minimum of 1.Written for commit 3ffc739. Summary will update on new commits.