Allow dependencies task to emit DOT graphs


Would it be possible to enhance AsciiDependencyReportRenderer and DependencyReportTask to emit .dot graphs as an alternative format to to plain ASCII? I think this would be helpful for design discussions. Maybe something like

gradle dependencies --format dot


Well you don’t want AsciiDependencyReportRenderer do render Dot files. I
guess. But the DependencyReportTask could be enhanced I guess to allow
different formats (e.g. as you suggested via a --format flag defaulting
to plain ascii. with having dot available it might be also useful to
have an option to pipe the output to a file.

Correct. I just realized that DependencyReportTask can receive a custom DependencyReportRenderer, which defaults to AsciiDependencyReportRenderer. It shouldn’t be that hard to integrate a new DotDependencyReportRenderer implementation in two ways:

  1. Define a custom script task:

    dotDependencyReport(type: DependencyReportTask) {
    renderer: new DotDependencyReportRenderer()

2: Have DependencyReportTask when a --format dot argument is specified.

1 would help in prototyping, 2 would be more appropriate as a general Gradle feature.