Paul Speed wrote:
Adam Murdoch wrote:
[snip]
I put a println in the alldocs tasks and I definitely see that
before the println at the top of my first child project. So it all
makes sense... I just don't know how to get my child projects to
configure themselves before the alldocs task configures itself.
As I mentioned before, you shouldn't have to. The Javadoc task is
supposed to evaluate its inputs lazily, that is, when the task
executes, which is after all the projects have been configured. And
this works fine for the Gradle build, and for a test build. So
something about your build is causing this to not work.
Let's try this:
task alldocs(type: Javadoc) {
subprojects.each {subproject ->
subproject.sourceSets.each {sourceSet ->
source { sourceSet.java } // <- note the reference to
sourceSet.java is in a closure
}
}
}
In retrospect this seems obvious, but it was my debug output that was
failing. Once I fixed the optionsFile issue then the javadoc is
generated correctly. Since my debug output was executing during
configuration time it was getting invalid results.
The sourceSets wiring is really almost magical.
It's not really (I hope). I guess we need to improve the user guide to
better describe how/why it works.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email