Ask an engineering lead how many places their app declares its minimum operating system version. If the answer is "one per module", every one of those is a place where two teams can disagree without knowing it. Build configuration is the least reviewed code a company owns, and it decides what ships.
Two Tools, Two Questions
Gradle, the build system under every Android app, has a mechanism for each half of the problem. A version catalog is one file that answers which version of a library the company uses. A convention plugin answers what a module's build should look like. Gradle defines the second as "a plugin that normally configures existing core and community plugins with your own conventions (i.e. default values)" (Gradle).
The effect is that a decision lives in one file. Raising a platform target is one edit, reviewed once.
The Claim We Had Wrong
An earlier version of this article said a catalog makes version drift impossible. It does not, and the vendor says so: "Version catalogs declare requested versions but do not enforce them. Gradle may still select different versions due to dependency graph conflicts or constraints applied through platforms or other dependency management APIs" (Gradle). A catalog guarantees that every team asks for the same version. What the build finally selects is a separate question with a separate tool.
The distinction matters to anyone signing off a security patch. Saying the catalog was updated is not the same as saying the patched version shipped.
Why This Was Rewritten Now
The Android build plugin changed underneath the old advice. "Android Gradle plugin 9.0 introduces built-in Kotlin support and enables it by default" (Android), and shared build logic that still applies the older Kotlin plugin now fails outright. Teams with a convention plugin fix that in one file. Teams without one fix it in every module.
What to Ask Your Team
- How many files set our platform targets? The right answer is one.
- Does our dependency file enforce versions or request them? If nobody knows, assume request.
- What stops a module from overriding the shared settings? Without an automated check, nothing does.
- Is the build plugin upgrade planned as its own change? It touches every module and should carry nothing else.
-Rocky
#BuildSystems #Gradle #TechnicalDebt #EngineeringDreams #StrategiaX
Originally published on ANDROID-ARCHITECT, the Android engineering blog of Strategia-X, with the full build files.
