Why this matters
Centralized versions keep cross-module binary compatibility and deterministic builds.
Define scalaVersion and library versions in version.sbt or ThisBuild in build.sbt; modules must not override scalaVersion or pin conflicting dependency versions locally.
Centralized versions keep cross-module binary compatibility and deterministic builds.
Side-by-side examples engineers can pattern-match during review.
// modules/api/build.sbt
scalaVersion := "2.13.14"
libraryDependencies += "org.typelevel" %% "cats-core" % "2.10.0"// version.sbt
ThisBuild / scalaVersion := "2.13.14"
// build.sbt
lazy val core = project.in(file("modules/core"))
lazy val api = project.in(file("modules/api")).dependsOn(core)ThisBuild / scalaVersion := "2.13.14"lazy val api = project.settings(scalaVersion := "3.4.1")From the same buckets as this rule.