Why this matters
Centralized module graph and versions make multi-module builds reproducible.
List all included builds/modules in settings.gradle and manage versions via gradle/libs.versions.toml (version catalogs). Forbid hardcoded versions and repo declarations in module build.gradle files.
Centralized module graph and versions make multi-module builds reproducible.
Side-by-side examples engineers can pattern-match during review.
// app/build.gradle
repositories { mavenCentral() }
dependencies { implementation "org.slf4j:slf4j-api:2.0.13" }// settings.gradle
include(":app", ":core")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
// gradle/libs.versions.toml
[versions]
slf4j = "2.0.13"
[libraries]
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }dependencies { implementation libs.slf4j }dependencies { implementation "org.slf4j:slf4j-api:2.0.13" }From the same buckets as this rule.