At work we have several sub components: A, B, C, D, E, F, G
Their relation is sth like
A
|
B
/ \
C D
\ /
E
|
F
|
G
Each of them has its own repository and release lifecyle (different release name, not always released at the same time)
Sometimes when developing a feature, the main modification is in C, but to make it work I also have to change something in A and B.
So I end up having three private versions: myA, myB, myC.
Before commiting each one of them, I want to perform our integration tests, which we normally launch by telling on which version of G it shall be launched.
By transitive dependency retrieval, it’s gonna take all the sub components, until A
(e.g. I tell to run with G version 1.1-snapshot, and it’s gonna look the ivy.xml to retrieve F 1.1-snap, E 1.0-snap (for instance) etc etc)
So in my case I want to use the ‘current’ G version and its dependencies, except myA, myB, myC.
I could write
dependencies {
integTest 'group:G:1.1-snapshot'
integTest ('group:C:myC'){force=true}
integTest ('group:B:myB'){force=true}
integTest ('group:A:myA'){force=true}
}
or as you suggested, I could use resolutionStrategy to specify all three versions of A,B,C
but I think it would be simpler to say
“I want to test myC version of C, and therefore ‘trust’ its declared dependencies, no matter what they are”
As you pointed out, conflict resolution will choose the newest version anyway, but that’s not necessarilly the one I want.
I want to trust the transitive version of a dependency (because I’m developing several librairies tightly coupled with each other)