mirror of https://github.com/sbt/sbt.git
Fix scripted tests and detect version automatically
This commit is contained in:
parent
00c3ab7da6
commit
05ee0e4f1d
|
|
@ -1,4 +1,5 @@
|
|||
ScriptedPlugin.scriptedSettings
|
||||
ScriptedPlugin.scriptedLaunchOpts += s"-Dproject.version=${version.value}"
|
||||
|
||||
libraryDependencies ++= {
|
||||
println(s"Evaluated ${sbtVersion in pluginCrossBuild value}")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ libraryDependencies ++= Seq(
|
|||
"ch.qos.logback" % "logback-classic" % "1.0.7"
|
||||
)
|
||||
|
||||
TaskKey[Unit]("check") <<= (ivyReport in Test, asciiTree in Test) map { (report, graph) =>
|
||||
TaskKey[Unit]("check") := {
|
||||
val report = (ivyReport in Test).value
|
||||
val graph = (asciiTree in Test).value
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../build.properties
|
||||
|
|
@ -6,7 +6,10 @@ libraryDependencies ++= Seq(
|
|||
"com.codahale" % "jerkson_2.9.1" % "0.5.0"
|
||||
)
|
||||
|
||||
TaskKey[Unit]("check") <<= (ivyReport in Test, asciiTree in Test) map { (report, graph) =>
|
||||
TaskKey[Unit]("check") := {
|
||||
val report = (ivyReport in Test).value
|
||||
val graph = (asciiTree in Test).value
|
||||
|
||||
def sanitize(str: String): String = str.split('\n').drop(1).map(_.trim).mkString("\n")
|
||||
val expectedGraph =
|
||||
"""default:default-dbc48d_2.9.2:0.1-SNAPSHOT [S]
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../build.properties
|
||||
|
|
@ -1 +1 @@
|
|||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.3-SNAPSHOT")
|
||||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % sys.props("project.version"))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ scalaVersion := "2.9.2"
|
|||
libraryDependencies +=
|
||||
"at.blub" % "blib" % "1.2.3" % "test"
|
||||
|
||||
TaskKey[Unit]("check") <<= (ivyReport in Test, asciiTree in Test) map { (report, graph) =>
|
||||
TaskKey[Unit]("check") := {
|
||||
val report = (ivyReport in Test).value
|
||||
val graph = (asciiTree in Test).value
|
||||
|
||||
def sanitize(str: String): String = str.split('\n').drop(1).mkString("\n")
|
||||
val expectedGraph =
|
||||
"""default:default-91180e_2.9.2:0.1-SNAPSHOT
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../build.properties
|
||||
|
|
@ -27,7 +27,8 @@ object Build extends sbt.Build {
|
|||
Project("test-dot-file-generation", file("d"))
|
||||
.settings(defaultSettings: _*)
|
||||
.settings(
|
||||
TaskKey[Unit]("check") <<= (dependencyDot in Compile) map { (dotFile) =>
|
||||
TaskKey[Unit]("check") := {
|
||||
val dotFile = (dependencyDot in Compile).value
|
||||
val expectedGraph =
|
||||
"""digraph "dependency-graph" {
|
||||
| graph[rankdir="LR"]
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../build.properties
|
||||
Loading…
Reference in New Issue