Is there a command line flag for 'gradle dependencies' so that the output is not affected by LatestModuleConflictResolver?


(Thomas H) #1

In the example below spock has a transitive dependency to ‘junit:junit-dep:4.10’ because of my dependency to ‘junit:junit-dep:4.10’. Spock on its own requires ‘junit:junit-dep:4.9’. I Want to see the real dependency version 4.9 in the dependency tree when I run ‘gradle dependencies’

apply plugin: ‘groovy’

dependencies {

testCompile(

[‘junit:junit-dep:4.10’]

, [‘org.spockframework:spock-core:0.6-groovy-1.8’]

) }


(Peter Niederwieser) #2

‘gradle dependencies’ shows a resolved version tree, i.e. the dependencies that will actually be used. If you want to see just the dependency tree of spock-core, you can create a new configuration (say ‘spock’) and add just spock-core to it.

By the way, you don’t need to include each dependency in ‘[’ and ‘]’. Just leave off the brackets.


(Thomas H) #3

Thanks for the tip with the separat configuration. It was a bit cumbersome for a build with 20+ dependencies to find out what drags in the version missmatch. Something like ‘gradle dependencies --raw’ would be helpful.

Appreciate the hint with the brackets, I do not know where I picked that up…

How do I mark a question as ‘answered’ ?


(Peter Niederwieser) #4

How do I mark a question as ‘answered’ ?

Unfortunately, only forum admins can close topics. So the best you can do is to express that you are satisfied with an answer and/or mark an answer as ‘good answer’.