Configuration doesn't include transitive dependencies

Hi

I have several project in which I’ve defined a configuration. When I specify dependencies on these configurations in other projects the artifact that was explicitly declared is resolved but none of the transitive dependencies to other sub projects are. So I’m manually adding these dependencies instead of automatically getting them from the other projects. There must be some better way right?

Example sub project DraperKalman:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 18
    buildToolsVersion "21.1.2"
... // android stuff

    dependencies {
        compile project(':DraperController')
    }

}

configurations {
    pc
}

sourceSets {
    main.java.srcDirs = ['src']

    pc {
        java {
            srcDirs = ['src']
        }
    }
}

dependencies {
    pcCompile project(':AndroidCompatLib')
    pcCompile project(':NovaWurksLib')

    pcCompile project(path: ':HsosSdk', configuration: 'pc')
    pcCompile project(path: ':DraperController', configuration: 'pc')
}

task createIntermediateClassesJar(type: Jar, dependsOn: pcClasses) {
    description = 'Assembles and builds classes and produces jar'

    def inputDir = 'build/classes/pc'
    def inputFiles = file(inputDir)
    inputs.dir(inputFiles)
    from fileTree(dir: inputDir, include: '**/*.class')
}

artifacts {
    pc createIntermediateClassesJar
}

And here is the other project AcsApps which refers to DraperKalman:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 18
    buildToolsVersion "21.1.2"

... // android stuff

    dependencies {
        compile project(':Algorithms')
        compile project(':DraperKalman')
        compile 'org.la4j:la4j:0.4.9'
    }

... // android stuff
}

configurations {
    pc
}

sourceSets {
    pc {
        java {
            srcDirs = ['src']
            exclude 'com/novawurks/pacs/hsos/acs/android/**'
        }
    }
}

dependencies {
    pcCompile project(':AndroidCompatLib')
    pcCompile project(':Algorithms')

    pcCompile project(path: ':DraperKalman', configuration: 'pc')
    pcCompile 'org.la4j:la4j:0.4.9'
}

task createIntermediateClassesJar(type: Jar, dependsOn: pcClasses) {
    description = 'Assembles and builds classes and produces jar'

    def inputDir = 'build/classes/pc'
    def inputFiles = file(inputDir)
    inputs.dir(inputFiles)
    from fileTree(dir: inputDir, include: '**/*.class')
}

artifacts {
    pc createIntermediateClassesJar
}

build.dependsOn buildPc

When I show the dependencies of the AcsApps project the defaults like Compile show all of the transitive and references to the other sub projects in my build.

compile - Classpath for compiling the main sources.
+--- project :Algorithms
|    +--- project :NovaWurksLib
|    +--- junit:junit:4.12
|    |    \--- org.hamcrest:hamcrest-core:1.3
|    +--- org.jodd:jodd-core:3.6.5
|    \--- rhino:js:1.7R2
+--- project :DraperKalman
|    \--- project :DraperController
|         +--- com.android.support:support-v4:22.1.1
|         |    \--- com.android.support:support-annotations:22.1.1
|         \--- project :HsosSdk
|              \--- project :HsosThrift
|                   +--- com.google.android:android:4.1.1.4
|                   |    +--- commons-logging:commons-logging:1.1.1
|                   |    +--- org.apache.httpcomponents:httpclient:4.0.1 -> 4.2.5
|                   |    |    +--- org.apache.httpcomponents:httpcore:4.2.4
|                   |    |    +--- commons-logging:commons-logging:1.1.1
|                   |    |    \--- commons-codec:commons-codec:1.6
|                   |    +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
|                   |    +--- xerces:xmlParserAPIs:2.6.2
|                   |    +--- xpp3:xpp3:1.1.4c
|                   |    \--- org.json:json:20080701
|                   +--- org.slf4j:slf4j-android:1.7.12
|                   |    \--- org.slf4j:slf4j-api:1.7.12
|                   +--- com.android.support:support-v4:22.1.1 (*)
|                   \--- project :Thrift
|                        +--- project :NovaWurksLib
|                        +--- project :AndroidCompatLib
|                        \--- org.apache.thrift:libfb303:0.9.1
|                             \--- org.apache.thrift:libthrift:0.9.1
|                                  +--- org.slf4j:slf4j-api:1.5.8 -> 1.7.12
|                                  +--- org.apache.commons:commons-lang3:3.1
|                                  \--- org.apache.httpcomponents:httpclient:4.2.5 (*)
\--- org.la4j:la4j:0.4.9

However the dependencies for the PC config only shows the project that are explicitly referenced.

pcCompile - Compile classpath for source set 'pc'.
+--- project :AndroidCompatLib
+--- project :Algorithms
|    +--- project :NovaWurksLib
|    +--- junit:junit:4.12
|    |    \--- org.hamcrest:hamcrest-core:1.3
|    +--- org.jodd:jodd-core:3.6.5
|    \--- rhino:js:1.7R2
+--- project :DraperKalman
\--- org.la4j:la4j:0.4.9

Is there a way to get all of the transitive from the PC configuration to be automatically resolved as they are in the default config?

Thanks, Derek