Using gradle 1.5, the dependency configuration below omits to generate dependencies for the “gwt” configuration in the generated POM file even though the “gradle dependencies” command shows the “gwt” dependencies in the “compile” group.
dependencies {
compile project(':subproject-core')
// ----------------------------------------------------
// GWT dependencies
// ----------------------------------------------------
gwt group:'com.google.gwt', name:'gwt-user', version:GWT_VERSION
gwt group:'com.sencha.gxt',name:'gxt',version:GXT_VERSION
// apparently the line below is not the same as declaring the dependencies in the compile group directly
compile configurations.gwt
// don't duplicate the GWT dependencies again
// now the GWT emulation source (only needed for cross compiling from java to javascript)
gwt group:'commons-lang',
name:'commons-lang-gwt',
version:'2.4.0', classifier:'sources'
// ----------------------------------------------------
// Compile
// ----------------------------------------------------
compile ...other dependencies here
}
However the dependency configuration below works and the generated POM contains the expected dependencies
dependencies {
compile project(':subproject-core')
// ----------------------------------------------------
// GWT dependencies
// ----------------------------------------------------
compile group:'com.google.gwt', name:'gwt-user', version:GWT_VERSION
compile group:'com.sencha.gxt',name:'gxt',version:GXT_VERSION
compile ...other dependencies here
// now the GWT emulation source (only needed for cross compiling from java to javascript)
gwt group:'commons-lang',
name:'commons-lang-gwt',
version:'2.4.0', classifier:'sources'
}
This may get around the missing dependency from the generated POM issue, but I still need a group with all my client side dependencies to do a gwt compile with, namely the “gwt” group and I don’t want to list the same dependencies twice.
Can you explain why I can’t use
compile configurations.gwt
to do a bulk add of dependencies into the compile group?