Hey,
I'm using the latest Gradle HEAD and I'm experiencing an unexpected behavior
with the subprojects { } method:
subprojects {
if (name.startsWith('spring-')) {
assert name == "spring-core"
configurations {
moduleJars
sources
archives
}
dependencies {
moduleJars project('java14')
moduleJars project('java15')
}
task files << {
configurations.moduleJars.files.each { file -> println file.name }
}
task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
}
artifacts {
archives moduleJar
}
task uploadArchives(type: Upload) {
dependsOn moduleJar
configuration = configurations.archives
repositories {
flatDir(dirs: dist_dir)
}
}
moduleJar.doFirst {
assert
configurations.ivyService.ivyService.ivyService.metaDataProvider.module.name ==
"spring-core"
for (jar in configurations.moduleJars.files) {
moduleJar.merge(jar)
}
}
}
}
The second assert (the one in the moduleJar task) fails while the first assert
works. Is this as expected? I got the same result with Gradle 0.8.
I've added these asserts because configurations.moduleJars is throwing an
expection saying the moduleJars property is not found.
I've uploaded the entire project for download here:
http://3.ly/I7W
Thanks for your help
Steven