mirror of https://github.com/sbt/sbt.git
parent
81a204fe08
commit
6119663e48
|
|
@ -0,0 +1,29 @@
|
||||||
|
import net.virtualvoid.sbt.graph.Plugin._
|
||||||
|
|
||||||
|
graphSettings
|
||||||
|
|
||||||
|
scalaVersion := "2.9.2"
|
||||||
|
|
||||||
|
libraryDependencies ++= Seq(
|
||||||
|
"org.slf4j" % "slf4j-api" % "1.7.2",
|
||||||
|
"ch.qos.logback" % "logback-classic" % "1.0.7",
|
||||||
|
"com.typesafe.akka" % "akka-actor" % "2.0.3")
|
||||||
|
|
||||||
|
TaskKey[Unit]("check") <<= (ivyReport in Test, asciiTree in Test) map { (report, graph) =>
|
||||||
|
def sanitize(str: String): String = str.split('\n').drop(1).map(_.trim).mkString("\n")
|
||||||
|
val expectedGraph =
|
||||||
|
"""default:default-e95e05_2.9.2:0.1-SNAPSHOT [S]
|
||||||
|
| +-ch.qos.logback:logback-classic:1.0.7
|
||||||
|
| | +-ch.qos.logback:logback-core:1.0.7
|
||||||
|
| | +-org.slf4j:slf4j-api:1.6.6 (evicted by: 1.7.2)
|
||||||
|
| |
|
||||||
|
| +-com.typesafe.akka:akka-actor:2.0.3 [S]
|
||||||
|
| | +-com.typesafe:config:0.3.1
|
||||||
|
| |
|
||||||
|
| +-org.slf4j:slf4j-api:1.7.2
|
||||||
|
| """.stripMargin
|
||||||
|
IO.writeLines(file("/tmp/blib"), sanitize(graph).split("\n"))
|
||||||
|
IO.writeLines(file("/tmp/blub"), sanitize(expectedGraph).split("\n"))
|
||||||
|
require(sanitize(graph) == sanitize(expectedGraph), "Graph for report %s was '\n%s' but should have been '\n%s'" format (report, sanitize(graph), sanitize(expectedGraph)))
|
||||||
|
()
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../../plugins.sbt
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
> check
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.0-RC3")
|
||||||
|
|
@ -12,7 +12,6 @@ TaskKey[Unit]("check") <<= (ivyReport in Test, asciiTree in Test) map { (report,
|
||||||
val expectedGraph =
|
val expectedGraph =
|
||||||
"""default:default-91180e_2.9.2:0.1-SNAPSHOT
|
"""default:default-91180e_2.9.2:0.1-SNAPSHOT
|
||||||
| +-%sat.blub:blib:1.2.3 (error: not found)%s
|
| +-%sat.blub:blib:1.2.3 (error: not found)%s
|
||||||
| +-org.scala-lang:scala-library:2.9.2
|
|
||||||
| """.stripMargin.format(scala.Console.RED, scala.Console.RESET)
|
| """.stripMargin.format(scala.Console.RED, scala.Console.RESET)
|
||||||
require(sanitize(graph) == sanitize(expectedGraph), "Graph for report %s was '\n%s' but should have been '\n%s'" format (report, sanitize(graph), sanitize(expectedGraph)))
|
require(sanitize(graph) == sanitize(expectedGraph), "Graph for report %s was '\n%s' but should have been '\n%s'" format (report, sanitize(graph), sanitize(expectedGraph)))
|
||||||
()
|
()
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.6.1-SNAPSHOT")
|
|
||||||
Loading…
Reference in New Issue