Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.18" exclude ("com.typesafe.play", "twirl-api_2.12"))
resolvers += Resolver.sbtPluginRepo("releases")
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
}
}
scalaVersion := "2.12.17"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment