mirror of https://github.com/sbt/sbt.git
Port project/global-plugin
This commit is contained in:
parent
f976c4b04f
commit
c02b053c55
|
|
@ -1,21 +0,0 @@
|
|||
import sbt._
|
||||
import Import._
|
||||
import sbt.Keys._
|
||||
|
||||
object MyBuild extends Build {
|
||||
lazy val mySettings = Defaults.defaultSettings ++ Seq(
|
||||
name := "my-test-proj",
|
||||
organization := "com.example",
|
||||
check <<= update map checkVersion,
|
||||
version := "0.1.0-SNAPSHOT")
|
||||
|
||||
lazy val proj = Project("my-test-proj", file("."), settings = mySettings)
|
||||
|
||||
lazy val check = taskKey[Unit]("Verifies that the junit dependency has the newer version (4.8)")
|
||||
|
||||
def checkVersion(report: UpdateReport): Unit = {
|
||||
for(mod <- report.allModules) {
|
||||
if(mod.name == "junit") assert(mod.revision == "4.8", s"JUnit version (${mod.revision}) does not have the correct version")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
lazy val check = taskKey[Unit]("Verifies that the junit dependency has the newer version (4.8)")
|
||||
|
||||
lazy val proj = (project in file(".")).
|
||||
settings(
|
||||
name := "my-test-proj",
|
||||
organization := "com.example",
|
||||
check <<= update map checkVersion,
|
||||
version := "0.1.0-SNAPSHOT"
|
||||
)
|
||||
|
||||
def checkVersion(report: UpdateReport): Unit = {
|
||||
for(mod <- report.allModules) {
|
||||
if(mod.name == "junit") assert(mod.revision == "4.8", s"JUnit version (${mod.revision}) does not have the correct version")
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
$ copy-file changes/Build.scala project/Build.scala
|
||||
$ copy-file changes/build.sbt build.sbt
|
||||
> reload
|
||||
|
||||
# ensure that a new global dependency gets picked up
|
||||
|
|
|
|||
Loading…
Reference in New Issue