How to copy an artifact and its dependencies to a specific folder?

Hello,

I was wondering how to copy an artifact and its dependency to a specific folder?

Reasons why: We have a parent project with sub projects.

I am using Gradle for the dependencies management (and some specific parts of the build) and ant for some other specific tasks. (I cannot use ant.importBuild due to this issue http://issues.gradle.org/browse/GRADLE-1102).

Our Ant build script expect some libraries (findbugs libs) to be in a specific folder.

I would like my parent Gradle build to copy the artifacts and its dependencies ‘com.google.code.findbugs:findbugs:2.0.1’ in a lib folder.

However I don’t know how to do this.

Thanks for Gradle,

Nicolas

repositories {
    mavenCentral()
}
  configurations {
    findbugs
}
  dependencies {
    findbugs 'com.google.code.findbugs:findbugs:2.0.1'
}
  task copyFindBugs(type: Copy) {
    from configurations.findbugs
    into "lib"
}

If you want to run FindBugs on the Gradle side, you can instead use the ‘findbugs’ plugin.