I am trying to create a task in my build that will list all the runtimeClasspath dependencies before it builds the project. So basically, it should be the equivalent of the following command but for all the subprojects:

```
gradle dependencies --configuration runtimeClasspath

```

So far I have managed to come up with a task that lists all the dependencies:

```
subprojects {
   task listDependencies(type: DependencyReportTask) {}

   complileJava.dependsOn listDependencies
}

```

It works great in the sense that it lists all the dependencies of all the subprojects, but as mentioned above, it also lists a lot of stuff I don't need to see.

How do I limit the output of the above task to just runtimeClasspath?

Thanks!