Dependencies

Seven lessons on the jars a project is built with: the configurations that decide which class path a dependency goes on, the repositories they come from, the reports that show the resolved graph, the rule behind a version conflict, the version catalog of Gradle 9, a platform that pins a family of modules, and a publication into the local Maven repository.

5.1 Configurations implementation, api, testImplementation, runtimeOnly and compileOnly, and the class path of each Open 5.2 Repositories mavenLocal() runs here, mavenCentral() is a real offline failure Open 5.3 gradle dependencies and dependencyInsight the resolved graph of a configuration and the path that chose one version Open 5.4 Conflict resolution two versions of one module on one graph, and the rule that picks the winner Open 5.5 Version catalogs gradle/libs.versions.toml and the accessors it generates Open 5.6 Platforms and constraints platform(), the JUnit BOM and a constraint that raises a version Open 5.7 Publish to mavenLocal and use the jar maven-publish, the files it writes into ~/.m2, and a second project that consumes them Open

Lessons