Hi Sten
Try this, assuming you have a single-project build:
apply plugin: 'java'
task copyRuntimeLibs(type: Copy) {
sourceSets.each { SourceSet sourceset ->
from sourceset.allSource
}
from javadoc.destinationDir
from configurations.runtime
into "$buildDir/copy"
}
Since the runtime configuration extends the compile configuration, iterating
over the runtime configuration is sufficient in most cases. The task could be
improved by putting the copied javadoc in a zip or in a sub-folder.
Regards, Etienne
On 14.01.2011, at 10:06, Sten Roger Sandvik wrote:
> Hi all.
>
> In my build I need to collect all dependencies from [compile, runtime]
> including javadoc and sources (if they are there). All the files will then be
> put into a directory. Is it an easy solution for this? I know the Eclipse and
> Idea plugin does this, but it does not seem to be a very elegant solution. Or
> am I missing something? :-)
>
> BR,
> Sten Roger Sandvik
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email