Last active
April 16, 2021 07:12
-
-
Save xuwei-k/3085e3c6b8162eb9f8e6e89a0f8322e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addDependencyTreePlugin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment