Why does Gradle think I'm requesting a 'default' configuration?


(Noel Yap) #1

I’m getting the following error:

Module version group:, module:setter-for-catan, version:unspecified, configuration:compile declares a dependency on configuration ‘default’ which is not declared in the module descriptor for group:play, module:play_2.10, version:2.1.

even though ‘build.gradle’ has:

dependencies {

compile ‘play:play_2.10:2.1.1’

}

Creating a ‘default’ configuration in Play’s ‘ivy.xml’ fixes the problem, but I think this isn’t the right way to do it. What is?


(Peter Niederwieser) #2

In Ivy, you always depend on a configuration. If you don’t name one in the dependency declaration, you depend on ‘default’.


(Noel Yap) #3

How does one name a configuration in the dependency declaration?


(Peter Niederwieser) #4

See the Gradle User Guide.


(Noel Yap) #5

I’ve been going through that. I’ve also been going through the slides from the class a couple of weeks ago.


(Noel Yap) #6

Obviously, I’m very confused. In:

dependencies {

compile ‘play:play_2.10:2.1.1’

}

what is ‘compile’ if not a name for a configuration in the dependency declaration?


(Peter Niederwieser) #7

I’ve been going through that.

It’s here: 49.4.9. Dependency configurations


(Peter Niederwieser) #8

what is compile if not a name for a configuration in the dependency declaration?

The model is that a configuration of one project depends on a configuration of another project (or module).


(Noel Yap) #9

OK, I think I see. The ‘compile’ in:

dependencies {

compile ‘play:play_2.10:2.1.1’

}

refers to the configuration of the project specified by build.gradle, not the configuration for Play. Is that correct?

Thanks, Noel


(Peter Niederwieser) #10

Yes that’s correct.