Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created November 2, 2022 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuwei-k/c8eddba946363d94279180ccf384c0c6 to your computer and use it in GitHub Desktop.
Save xuwei-k/c8eddba946363d94279180ccf384c0c6 to your computer and use it in GitHub Desktop.
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