Dependency report task is not printing any info about "files dependencies"

I would expect Dependency report task to be aware of so called Files dependencies but it’s not.

Having this simple project:

apply plugin: 'java'

repositories {
    mavenCentral()
}

dependencies {
    compile "log4j:log4j:1.2.16"
    compile files('lib/some.jar')
}

When I invoke:

$gradle clean dependencies --configuration compile

the only dependency I can see is log4j:

compile - Dependencies for source set 'main'.
\--- log4j:log4j:1.2.16

but I would expect something like this:

compile - Dependencies for source set 'main'.
+--- log4j:log4j:1.2.16
\--- files('lib/some.jar')

Gradle Version: 2.8, 3.0
Operating System and JVM version: Ubuntu Xenial, java version “1.8.0_101”

Of course that there is a workaround - deploy all such files dependencies to a “local” repository (be it artifactory/nexus).

I just got surprised by this when debugging some old scripts behaviour.

Any thoughts on this?

I think it is the indented behaviour that the dependencies task only prints module dependencies and does not include other types of dependencies.

In general, you can easily write your own tasks to analyse dependencies in more detail. See for example:

I am moving this to discuss for further discussions if desired.

Hi @jendrik,

thank you for the response. But let me disagree a bit :wink:

  1. there is no sign of such behaviour being described nor in user documentation nor in javadoc.

  2. And even if it’s described then if it “hides” half of the dependencies (because of 2nd class citizen dependency types) it’s no-good.

IMHO the dependency report task should report ANY type of dependency.

  1. solution you linked is outdated, even with the updated solution using graphviz I find it inconvenient because you have to install another tool to get the output :wink:

I definitely find good dependency reporting tool to be a core functionality and a must for any “build & dependency management system” .

M.