I do not think this will do it. Imagine the following dependencies:
dependencies {
compile 'org.jdom:jdom:1.1.1'
compile 'org.springframework:spring-web:3.0.5.RELEASE'
}
What I want is to have all dependencies in compile scope including
source/javadoc classifiers of theese dependencies (if they exist). So, my
resulting directory will include the following jar files:
jdom-1.1.1.jar
jdom-1.1.1-sources.jar
jdom-1.1.1-javadoc.jar
spring-web-3.0.5.RELEASE.jar
spring-web-3.0.5.RELEASE-sources.jar
spring-web-3.0.5.RELEASE-javadoc.jar
++ (all other spring-web transient dependency jars + javadoc + source of
theese)
Anyone know how to solve this?
2011/1/14 Etienne Studer <[email protected]>
> 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
>
>
>