On Apr 22, 2009, at 6:52 PM, Steve Appling wrote:
Thanks for the response. There are still a few things I am not
clear on, however.
Adam Murdoch wrote:
I don't think linkConfWithTask() ever did anything other than what
dependsOn(configurations.compile.buildDependencies) currently does.
Apparently I misunderstood the javadoc for linkConfWithTask. What
was the point
of the task name parameter? I thought that it ran the the specified
task for
all project dependencies in the specified configuration.
Some options:
* Option 1 *
You could use dependsOn() for each dependent project:
dependsOn(':someOtherProject')
This effectively adds:
javadoc dependsOn ':someOtherProject:javadoc'
You'd still need to declare the dependency in the compile
configuration, however. Perhaps we should change the java plugin to
add these in for each project which the current project dependsOn().
dependsOn() is a bit heavy-handed, however, in that it adds a bunch
of dependencies that you probably don't want.
Does Project.dependsOn(':someOtherProject') add a task dependency
between all
tasks in this project and similarly named tasks in
'someOtherProject'? The
javadoc for this wasn't clear to me - it just says that it adds an
"execution
dependency" to the other project. I don't know exactly what is
meant by
"execution dependency".
* Option 2 *
javadoc dependsOn
{ configurations
.compile
.buildDependencies.getDependencies(javadoc)*.project.javadoc }
i.e. javadoc dependsOn { the javadoc task in each project which the
compile configuration depends on }
Perhaps the java plugin should add this dependency too. Or we could
add a method to Configuration which expresses this more clearly
than the above.
I think that this is what I really want, but I also think it would
be useful to have a method on the configuration to help with this.
Perhaps something like:
javadoc.dependsOn(configurations.compile.tasks('javadoc'))
I had not realized that Task.dependsOn could take a closure. This
was the information I was missing. Configuration.buildDependencies
always returns an empty list during the configuration phase. So I
couldn't ever get anything like javadoc.dependsOn
configurations.compile.buildDependencies... to work.
This seems like a bug to me (buildDependencies returning empty list
during configuration phase). At the very least it needs to be
documented.
Could you file a Jira for this with fix for 0.6?
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email