Setting versions across packages

Dear developer colleagues,

I have a very large project consisting of many libraries and services that are interconnected and nested.

A small example:

  • Service A
    • Library B
      • Library D
        • Library E
    • Library C
      • Library D

If I as a developer now do something to library D, I have to:

  1. push this with publishToMavenLocal
  2. set the version to local in library C and B
  3. push C and B
  4. set version of C and B to local in service A

… and then I can receive the changes made in D in service A.

That’s a pretty big overhead. Is there a solution for this that gradle offers or does anyone know of any articles that address the issue? Would love to develop a more pleasant solution for this.

Thank you guys for the swarm knowledge!

You should practically never use mavenLocal() as it is broken by design.
Only in exceptional cases where the Gradle versions of the builds are not compatible or where the dependency is built by Maven, and even then only with a Repository Content Filter so that only exactly that intended library is pulled from mavenLocal().

But as long as the Gradle versions of those builds are compatible, what you are after are composite builds.