On 18/02/10 7:09 PM, Paul Speed wrote:
I feel like I'm missing something obvious, here, so forgive me...
I'm trying to define a dependency on a bunch of javadoc.jar files...
configurations {
projectJavaDocs { transitive=false }
}
dependencies {
projectJavaDocs "org.mystuff:core:${version}:javadoc"
projectJavaDocs "org.mystuff:util:${version}:javadoc"
...
}
And what I'd like to do is then expand all of those jars into
jar-specific sub-directories.
I can do one jar but I can't figure out the right incantations to do
multiple. Here is what I use to do just one:
task projectJavaDocs(type: Copy) {
into new File( buildWebsiteDir, "javadoc" );
from( zipTree(configurations.projectJavaDocs.singleFile) )
}
And maybe to reach my ultimate goal, I'm simply barking up the wrong
tree... as I need to 'repath' those files into sub-directories. I
know I can mess with the paths in an eachFile closure but I'm not sure
I can access the jar file name from there to redirect the files into a
sub-directory.
Is there an easy way to do this? Should there be? Or should I really
be using a copy {} per jar? (Which is what I'm going to do to get it
working for now.)
You could do something like:
task projectJavaDocs(type: Copy) {
into new File(buildWebsiteDir, "javadoc")
configurations.projectJavaDocs.each {
into(it.name) {
from zipTree(it)
}
}
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email