How To Copy Dependency Project's Artifact?

How can I copy the artifact from a dependency project? I’ve got the following setup: FrameworkB depends on FrameworkC, and FrameworkB’s pkg task should tar up the results of :FrameworkC:pkg. I got a “Could not determine the dependencies of task ‘:frameworkB:pkg’.” message when using the following build.gradle files:

frameworkB/build.gradle:

repositories {

mavenCentral() }

configurations {

pakage }

dependencies {

//pakage ‘com.google.code.findbugs:findbugs:2.0.1’

pakage project( ‘:frameworkC’ ) }

task pkg(type: Tar) {

from configurations.pakage

into “$buildDir/pkg” }

frameworkC/build.gradle:

configurations {

pakage }

task pkg(type: Tar) {

from ‘src/FrameworkC.java’

into “$buildDir/pkg” }

artifacts {

pakage pkg }

Believe what I need is some way to specify what artifact of configurations.pakage I’m looking to tar, but I haven’t figured out how that’s done.

Thanks,

josh

Try this:

dependencies {

pakage project(path: ‘:frameworkC’, configuration: ‘pakage’) }