What is best practice in factoring company wide dependencies out?

We have many gradle projects and I want a way to specify that projects get a standard set of dependencies at predefined versions so that each project stays consistent with regard to the dependency set it uses.

In maven, one might declare a dependencies or dependencyManagement section in the enterprise wide parent pom.

What is best practice for achieving this in gradle?

Thanks David

Hey David,

The custom plugin is the answer. E.g. in Gradle world you would have an enterprise wide plugin that has all the dependency configuration/logic (e.g. validation, blessed versions, ttl for versions, etc.).

Some features of Gradle that might be useful in such plugin: 1. strict conflict resolution strategy 2. forcing certain dependencies versions 3. init script to centralize the custom plugin’s dependencies / repositories.

Down the road we might add a out-of-the-box feature / plugin that potentially solves exactly this use case.

Hope that helps!