On 18/02/10 7:37 PM, Paul Speed wrote:
Not too bad... this is what I ended up with:
task projectJavaDocs << {
configurations.projectJavaDocs.resolvedConfiguration.resolvedArtifacts.each{
artifact ->
copy {
into new File( buildWebsiteDir, "javadoc/" + artifact.name )
from( zipTree(artifact.file) )
}
}
}
I appreciate any improvements... as it seemed like a bit of a long way
to go to get the artifacts. If I tried:
configurations.projectJavaDocs.artifacts.each{}
Configuration.artifacts is actually the set of outgoing artifacts to be
published, rather than the set of incoming artifacts. Once the Gradle
0.9 release is out the door, we might look at splitting the incoming and
outgoing parts of Configuration into separate things, so as to prevent
this ambiguity.
Instead, you can use Configuration.each() or Configuration.files, eg:
configurations.projectJavaDocs.each { File file -> ... }
Have a look at the API for Configuration for some more details:
http://gradle.org/0.8/docs/javadoc/org/gradle/api/artifacts/Configuration.html
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email