Is recursive publishing / easy in Gradle possible?

We have an Ant and Ivy construction management system, which basically consists of a common Ant file and a set of conventions around the directory structure.

One hurdle I am trying to overcome is a fairly common case of "recursive publishing." Let's say we have 5 internal code modules that have a dependency graph as follows:

Module dependencies

  • Each module must publish its ivy artifacts in our internal repo
  • Artifacts that have not yet been cleared for deployment for testing should have the status of "integration"
  • Artifacts deployed for testing should have a milestone status (manually promoted by the developer).
  • Artifacts verified by testers must have the status "release"

Tell the developer that all 5 modules are checked locally and made changes to them. Now he wants to push all of his changes into a milestone status. In other words, what should happen in the ivy repository:

  • e-1.0-RC1 is published
  • d-1.1-RC2 is published citing e-1.0-RC1 as a dependency
  • c-2.0-RC1 is published citing d-1.1-RC2 as a dependency
  • b-3.3-RC1 is published citing e-1.0-RC1 as a dependency
  • Finally, a-7.1-RC2 is published, citing c-2.0-RC1 and b-3.3-RC1 as dependencies.

I did not find an easy way to do this using ivy + Ant (Ivy promises something similar, called recursive, but I can not find any working examples).

Gradle sounds promising as it seems to have good support for several projects. I looked through the documents, but did not immediately find this case as an example. Is there an easy way to achieve this with gradle?

+4
source share
2 answers

The only way I can imagine this work is with a master assembly file that distributes version numbers to individual assembly files for each of your modules. This has the unfortunate side effect of linking your five modules into a unit that should be managed as a unit, but this may be the only way to achieve what you are looking for.

+1
source

This seems like a normal multi-project build for me. Assuming you are using a JVM-based language, Gradle has good built-in support using conventions (you can override these conventions according to the needs of your projects) - give it a try and see.

Feel free to ask for more details on multi-project builds using Gradle.

-1
source

All Articles