An Opinionated, Gradle-Based Approach to Automated Version Management
summary
Automates Android versioning by generating versionCode from git commit count (git rev-list --count) and deriving versionName from branch/tags so hotfixes and releases never clash; implements branch-order comparison to pick the closest parent when multiple releases are in flight. Built as Kotlin DSL Gradle tasks that run on CI, tag and sunset releases (git tag Vx.y.z, merge to master), include unit tests that mock git output, and are debuggable in Android Studio. Avoids env vars, uses command-line props. self-deriving versionCode pull commits from upstream release branches
AI-written summary · about
chapters (12)
- 0:00Introduction and agenda
- 1:14Speaker introduction
- 4:22Self-deriving version codes
- 9:19Self-deriving version names
- 15:39Release branch management
- 20:12Demo setup and folder structure
- 23:43Unit testing Gradle tasks
- 27:50Avoiding environment variables
- 30:19Kotlin DSL over Groovy
- 32:28Staying in Gradle for CI/CD
- 33:31On-demand vs scheduled jobs
- 35:36Final gotchas and Q&A
related talks
25mHow We Optimized Our Release Flow Using Google Play Console Release Tracks
38mLevel up your Android build
28mEffective Gradle Scripts for Android Projects
32m5 ways to improve your Android build productivity
43mThe New Android SDK Build System
24mFuture-proofing your Android release process
27mModern Source and Version Control with Git
39mAndroid Open-source repositories 101
