Publishing dependency report to jenkins

We’d like to have the output of “gradle dependencies” be published as a report in jenkins. Anyone done this?

here is a sample of a dependency report: ±-- com.myco.bam:bam-mapi-core:9.0.0-m12-SNAPSHOT [default] |

±-- com.myco.bam:bam-util:9.0.0-m12-SNAPSHOT [default] |

|

±-- com.myco.bam:bam-config:9.0.0-m12-SNAPSHOT [default]

One way would be to capture standard out past the ±-- an save to a file and have jenkins save that file as an artifact. I’m not sure how to capture output from gradle and save to a file though…

thoughts?

Take a look at DependencyReportTask (http://gradle.org/docs/current/javadoc/org/gradle/api/tasks/diagnostics/DependencyReportTask.html). This is the task that is used when ‘dependencies’ runs. You can create an instance of this task and configure it with an output file.