Our organization published a set of libraries which are consumed by a multi-project and by each other.
When resolving the dependency graph we would like gradle to align all module of same library to the highest version it find for that same library.
So for example:
If in our multi-project we declare a dependency on:
lib A Module x and z version 1 and on lib B Module y version 2
lib B module y version 2 depends on lib A Module x version 2
So gradle will fetch lib-A module-x version-2 lib-A module-z version-1 lib-B module-y version-2
But we would like to align all module of lib A to highest version found: 2 (found for module x)
We do not know ahead the version each library needs, that info can be fetch from all transitive dependency, but that can be found only after gradle resolved all dependency, and so it is too late.
Any suggestion ? Solutions?