Subproject dependency list

Hi All,

I have a multi-project build and in one of the subprojects I declare a dependency on some local Jar files like this:

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    testCompile 'org.testng:testng:6.9.4'
}

The project compiles okay, so I know everything is working. However when I run the dependencies task I dont’ see the jars in the output.

e.g. when I run λ gradle :tools:cputest:dependencies
the listing is blank. Is this a bug or expected behavior?

archives - Configuration for archive artifacts.
No dependencies

compile - Dependencies for source set 'main'.
No dependencies

compileClasspath - Compile classpath for source set 'main'.
No dependencies

compileOnly - Compile dependencies for source set 'main'.
No dependencies

default - Configuration for default artifacts.
No dependencies

runtime - Runtime dependencies for source set 'main'.
No dependencies

testng dependency is not visible as well? Are you sure you display dependencies of the same subproject?

As I described in my blog post you can create an additional task:

subprojects {
    task allDeps(type: DependencyReportTask) {}
}

to display all dependencies for all the subprojects to verify that there are any dependencies available anywhere.

The testng deps are visible. I left those out in my previous post for brevity.

The problem is only with file or fileTree deps. Project and plugin deps show up as expected.

Here is the full output.

λ gradle :tools:cputest:dependencies
:tools:cputest:dependencies

------------------------------------------------------------
Project :tools:cputest - Java CPU Sample application
------------------------------------------------------------

archives - Configuration for archive artifacts.
No dependencies

compile - Dependencies for source set 'main'.
No dependencies

compileClasspath - Compile classpath for source set 'main'.
No dependencies

compileOnly - Compile dependencies for source set 'main'.
No dependencies

default - Configuration for default artifacts.
No dependencies

runtime - Runtime dependencies for source set 'main'.
No dependencies

testCompile - Dependencies for source set 'test'.
\--- org.testng:testng:6.9.4
     +--- org.beanshell:bsh:2.0b4
     \--- com.beust:jcommander:1.48

testCompileClasspath - Compile classpath for source set 'test'.
\--- org.testng:testng:6.9.4
     +--- org.beanshell:bsh:2.0b4
     \--- com.beust:jcommander:1.48

testCompileOnly - Compile dependencies for source set 'test'.
\--- org.testng:testng:6.9.4
     +--- org.beanshell:bsh:2.0b4
     \--- com.beust:jcommander:1.48

testRuntime - Runtime dependencies for source set 'test'.
\--- org.testng:testng:6.9.4
     +--- org.beanshell:bsh:2.0b4
     \--- com.beust:jcommander:1.48

BUILD SUCCESSFUL

Total time: 5.296 secs