Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

You want 60 Gradle repositories to share dependency versions and build conventions. Compare publishing a shared version catalog, a platform, and a set of convention plugins, and propose a combination.

The three solve different problems. A published version catalog shares names and versions for declaring dependencies but does not align transitive versions; a published platform, built with the java-platform plugin, aligns versions during resolution like a Maven BOM; and convention plugins share build logic such as the Java toolchain, tests, static analysis and publishing. I would combine them: convention plugins apply the company platform automatically, a shared catalog gives readable accessors, and all three are versioned and rolled out to the 60 repositories by update bots.

Why this question is asked

With 60 repositories, consistency stops being a matter of discipline. Each team copies a build file, adjusts it, and within a year there are 60 slightly different builds with different versions of the same libraries and different test settings. A shared approach is clearly needed, and Gradle offers three tools that look similar from a distance. Interviewers ask this design question to see whether we know what each one actually does, so we do not pick one and expect it to solve the others' problems. In this answer, we will look at each tool on its own, compare them, design a combination, and plan how updates reach 60 repositories.

1The Shared Version Catalog

A version catalog is a TOML file of aliases, coordinates and versions. Published with the version-catalog plugin, it becomes an artifact that other builds import in their settings, so every repository can write implementation(myorg.jackson.databind) with the same coordinates and version.

Its strength is readability and consistency of declarations. Its limit is that it only affects what a build script references. A transitive dependency, such as a Netty module brought in by a library, is not touched by the catalog, so it can still resolve to a different version in each repository.

2The Shared Platform

A platform is a module made of dependency constraints. We build one with the java-platform plugin and publish it; consumers use it with implementation(platform(...)). During resolution, its constraints align every matching module in the graph, transitive ones included. That is exactly what a Maven BOM does, and Gradle can publish the platform as a BOM so Maven repositories can use it too.

Java
// myorg-platform/build.gradle.kts
plugins { `java-platform`; `maven-publish` }
group = "com.myorg"; version = "2026.11.0"
javaPlatform { allowDependencies() } // needed to import other BOMs
dependencies {
api(platform("org.springframework.boot:spring-boot-dependencies:3.5.0"))
constraints {
api("io.github.resilience4j:resilience4j-retry:2.2.0")
api("com.myorg:payments-client:4.1.0")
}
}
publishing { publications { create<MavenPublication>("platform") { from(components["javaPlatform"]) } } }
// a consumer
dependencies { implementation(platform("com.myorg:myorg-platform:2026.11.0")) }

Notice that our platform builds on the Spring Boot BOM and adds our own choices on top. Consumers then get one tested set of versions with one line. The limit of a platform is that it only covers versions; it says nothing about how a repository compiles, tests or publishes.

3Convention Plugins

A convention plugin is a small Gradle plugin that applies shared build logic: the Java toolchain, JUnit Platform for tests, Checkstyle or Error Prone, the jar manifest, publishing to the internal repository, and so on. Published from a build-logic repository, it lets each of the 60 builds apply myorg.spring-service and get the same setup.

It is the only one of the three that carries behaviour. It can also apply the other two: a convention plugin can add the company platform to the right configurations, so no repository can forget it.

What each tool shares
NeedCatalogPlatformConvention plugins
Same coordinates in declarationsYesNoNo
Aligned transitive versionsNoYesOnly by applying a platform
Same toolchain, tests, checksNoNoYes
Usable from Maven buildsNoYes, as a BOMNo
Type-safe accessorsYesNoYes, for what plugins add
None of the three covers every row, which is why the combination works.

4A Combination That Works

My proposal has three artifacts, built and published from one build-platform repository so they are released together. The platform holds the versions: it imports the Spring Boot BOM and adds constraints for the other libraries we standardise. The catalog holds aliases for the same libraries, mostly without versions, plus the platform itself and our plugins, so declarations are readable. The convention plugins apply the platform automatically and set up the toolchain, tests, analysis and publishing.

Java
// in the convention plugin, myorg.spring-service.gradle.kts
plugins { java; id("org.springframework.boot") }
dependencies {
implementation(platform("com.myorg:myorg-platform:2026.11.0")) // released with the plugin
}
java { toolchain { languageVersion = JavaLanguageVersion.of(25) } }
tasks.withType<Test>().configureEach { useJUnitPlatform() }
// in a service repository
plugins { id("myorg.spring-service") version "2026.11.0" }
dependencies {
implementation(myorg.spring.boot.starter.web) // alias from the shared catalog, no version
implementation(myorg.payments.client)
}
Step throughThe combined setup
  1. Service build scriptapplies myorg.spring-service, declares aliases
  2. Shared catalogaliases for libraries and plugins
  3. Convention pluginstoolchain, tests, checks, publishing; apply the platform
  4. Company platformSpring Boot BOM plus our constraints

4 layers, from the top down. Step through them one at a time.

Released together with one version number from one repository.

Notice how little each service has to know. It applies one plugin version, and that version brings the matching platform. The catalog makes declarations short and avoids typos. A team that needs to deviate, for example to take a security patch before the next platform release, can still declare a higher version for one library, and highest-wins resolution lets it through.

5Versioning and Rolling Out Updates

All three artifacts carry the same version, for example a calendar version like 2026.11.0, so it is obvious which catalog goes with which platform and plugins. The build-platform repository has its own CI that builds a few sample consumers against each release candidate before publishing.

Updates reach 60 repositories through Renovate or Dependabot, which open a pull request in each repository bumping the plugin version and the catalog version in settings. Each repository's own CI runs its tests on the new versions, so a breaking change shows up as a failing pull request in the affected repositories, not as a surprise in production. A dashboard of which repository is on which version shows the laggards, and the platform team helps them catch up instead of waiting.

6Follow-up questions

Why not put everything in the convention plugins and skip the catalog?

We could hard-code dependencies in the plugins, but then each service's own dependencies would still be declared with raw coordinates and versions. The catalog keeps those declarations short and consistent. It is the cheapest of the three to maintain, so it is worth having even though it is not essential.

What about the Maven repositories in the company?

The platform is published as a BOM, so Maven builds can import it in dependencyManagement and get the same versions. Convention plugins and catalogs have no Maven equivalent; the Maven side would need a shared parent POM that mirrors the conventions.

How do you handle a team that needs a different Spring Boot version?

During a Boot upgrade, publish two platform lines for a while, for example 2026.11 on Boot 3.5 and 2027.01 on Boot 4.0, with matching plugins. Teams move when they are ready, and the old line gets security updates until a published end date.

7Conclusion

In this answer, we compared three ways to share setup across 60 repositories. A published version catalog shares coordinates and versions for declarations but does not align transitive versions; a published platform built with java-platform aligns versions during resolution like a Maven BOM; and convention plugins share build logic such as toolchains, tests, analysis and publishing. A combination works best: convention plugins apply the platform, the catalog gives readable accessors, and all three are released together with one version and rolled out by update bots.

What to say in the interviewAbout 80 seconds aloud

Open with

I would use all three, because they do different jobs. A shared version catalog only shares names and versions for the dependencies a build script declares; it makes declarations readable and consistent, but it does not touch transitive versions.

Then, if they want more

A platform, built with the java-platform plugin and published like a BOM, adds constraints during resolution, so it aligns every module in the graph, including transitive ones. Ours would import the Spring Boot BOM and add constraints for the libraries we standardise, and Maven repositories could use it too.

Convention plugins share build logic: the Java toolchain, JUnit Platform, static analysis, publishing. They are the only one of the three that carries behaviour. The combination I would propose is one build-platform repository that releases all three with the same version number.

The convention plugin, for example myorg.spring-service, applies the matching platform automatically, so no repository can forget it, and the catalog gives aliases, mostly without versions, so service build files are just a plugin and a list of aliases. Before each release, CI builds sample consumers.

Then Renovate or Dependabot opens pull requests in the 60 repositories to bump the version, each repository's CI tests it, and a dashboard shows who is behind so we can help them.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Gradle user manual
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "You want 60 Gradle repositories to share dependency versions and build conventions....": https://scrivio-interview-library.netlify.app/java/gradle/e3880895a6/