What is the best pratice for managing branches for our artefacts as Gradle hides the ‘branch’ property of Ivy. Is there a Gradle specific pratice that allows to do that. Thanks.
The most reasonable approach is to factor the branch name into some part of the version identifier (probably module name or version). Basically, the artifact name will be different for a different branch. It makes certain things easier - the artifact itself tells the story rather than relying on the accuracy/existence of the ivy.xml metadata.
I would discourage from using classifier for that use case because a classifier means the same artifact but a different metadata (just like sources or javadoc). In your case you have different artifacts because they come from a different branch.
Hope that helps!
Yes, it makes sense. As an Ivy user, I’ve used the ‘branch’ attribute simply because it was there, but I agree that the mere fact that such an important information is hidden in the metadata can be seen as a problem (and I like the idea that the ‘artifact itself tells the story’)
So I’m going to factor the branch into the name of the module (I will not factor it in the version because it would break the ‘latest.integration’ scheme, as I would randomly get one branch or an other)