Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Last active Apr 16, 2021
Embed
What would you like to do?
import scala.sys.process.Process
Seq(Compile, Test).map { x =>
(x / TaskKey[File]("dependencySvg")) := {
val output = target.value / s"dependencies-${x.name}.svg"
Process(Seq(
"dot",
"-o" + output.getAbsolutePath,
"-Tsvg",
(x / sbt.plugins.DependencyTreeKeys.dependencyDot).value.getAbsolutePath
)).!
Process(Seq("open", output.getAbsolutePath)).!
output
}
}
addDependencyTreePlugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment