Versioning of artifacts and multi-project builds

Hi guys,

I just begin learning Gradle (2.0) and have some questions concerning the versioning of applications components using gradle. Components mean Eclipse projects. Each of them generate an artifact (JAR, WAR or similar) and together implements an application.

We have a simple package structure, for example:


ProjectB depends from ProjectA

ProjectC depends from ProjectB

Currently, we use ANT scripts to build the required artifacts. They use a master “version info” file indicating the individual version of the components to be created (if version doesn’t exist in the repository) or reused (if version already available in the repository). The version number assigned to a component and the version of its dependencies are saved in a file inside the corresponding artifact. This version number is also used to tag the code baseline (in the repository) used to build each of the artifacts.

We are planning to redesign the package structure, to achieve a better encapsulation of the business logic, for example:


ProjectB depends from ProjectA

ProjectC depends from ProjectA

ProjectD depends from ProjectA, ProjectB and ProjectC This change would have a big impact on the complexity of the used ANT scripts.

Here my questions: a.) Is Gradle really a better alternative to reimplement the required scripts? b.) I’m missing tutorials about related topics like “versioning of multi-project builds”, “reusing artifacts” or “synchronizing the code version in the repository (e.g. Subversion) with the version of the artifacts (e.g. Maven-Repository)“. Do you have some references for me? c.) Please, can you tell me about the strategy to solve this task using Gradle?

Thank you in advance, Jaime