Confusing error messages regarding the configuration name when there is a version conflict

Hi

If I run ‘gradle assemble’ from the root of my multi-project build, I get this (which is okay):

Could not resolve all dependencies for configuration ‘:edoras-commons-test:compile’. > A conflict was found between the following modules:

  • org.hamcrest:hamcrest-core:1.1

  • org.hamcrest:hamcrest-core:1.3

I then run ‘gr dependencyInsight --configuration :edoras-commons-test:compile --dependency org.hamcrest:hamcrest-core’ and get the following message:

Configuration with name ‘:edoras-commons-test:compile’ not found.

I’m confused: first, Gradle tells me there is a conflict in a given configuration, and then when I inspect that configuration, it tells me the configuration does not exist.

Can anybody help me out?

Thanks and regards, Etienne

You need to run ‘gradle :edoras-commons-test:dependencyInsight --configuration compile’, not ‘gradle dependencyInsight --configuration :edoras-commons-test:compile’.

Ok Thanks, Peter.

In this case, I propose to improve the error message ‘Could not resolve all dependencies for configuration ‘:edoras-commons-test:compile’’

to something like

‘Could not resolve all dependencies for configuration ‘compile’ in module :edoras-commons-test’

Raised GRADLE-3035.

Thanks, Peter.