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’
‘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.
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…
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’.