gradle-dependency-graph-generator-plugin icon indicating copy to clipboard operation
gradle-dependency-graph-generator-plugin copied to clipboard

Change directory output

Open dmondon-accor opened this issue 2 years ago • 2 comments

Hi! Is it possible to change the directory output to save in another directory than /build? Thanks

dmondon-accor avatar Jul 06 '23 20:07 dmondon-accor

Nope it isn't. Why would you want to change it? It's quite common to place reports there.

vanniktech avatar Jul 06 '23 20:07 vanniktech

For what it's worth, I was looking to do the same thing. Reason being that I want to be able to check the dotfile and PNG into git and easily reference in readmes, etc. I know I can use gitignore for that, but it's a bit ugly.

I managed to get it working by registering my own instance of ProjectDependencyGraphGeneratorTask without using the plugin's extension, like:

val generator = DependencyGraphGeneratorExtension.ProjectGenerator(
  // your config here
)

project.tasks.register("generateReadmeDiagram", ProjectDependencyGraphGeneratorTask::class.java) {
  projectGenerator = generator
  outputDirectory = File(project.projectDir, "docs") // change this!
}

then running gradle generateReadmeDiagram.

jonapoul avatar Feb 03 '24 15:02 jonapoul