aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-12 16:06:14 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-12 16:06:14 -0500
commit906db6c55289d9aba5da824d5f2f3d2cae70813e (patch)
tree1b5fea4598ede93c60f9940b6776f2a0506daa46 /test
parentb143c01a2e180b647eb27338cb7302aa38ef10c6 (diff)
downloadcbt-906db6c55289d9aba5da824d5f2f3d2cae70813e.tar.gz
cbt-906db6c55289d9aba5da824d5f2f3d2cae70813e.tar.bz2
cbt-906db6c55289d9aba5da824d5f2f3d2cae70813e.zip
Improved how to express dependencies
Add - Constructor syntax for cross-scala-version dependencies (as rightfully requested on reddit) and encouraged over SBT's still supported operator syntax - Add support for classifiers other than "sources"
Diffstat (limited to 'test')
-rw-r--r--test/simple/build/build.scala9
-rw-r--r--test/test.scala6
2 files changed, 13 insertions, 2 deletions
diff --git a/test/simple/build/build.scala b/test/simple/build/build.scala
new file mode 100644
index 0000000..3f7633b
--- /dev/null
+++ b/test/simple/build/build.scala
@@ -0,0 +1,9 @@
+import cbt._
+import scala.collection.immutable.Seq
+import java.io.File
+class Build(context: cbt.Context) extends BasicBuild(context){
+ override def dependencies = Seq(
+ ScalaDependency("com.typesafe.play", "play-json", "2.4.4"),
+ JavaDependency("joda-time", "joda-time", "2.9.2")
+ ) ++ super.dependencies
+}
diff --git a/test/test.scala b/test/test.scala
index 7c805c9..47bd28b 100644
--- a/test/test.scala
+++ b/test/test.scala
@@ -67,13 +67,15 @@ object Main{
compile("nothing")
usage("multi-build")
compile("multi-build")
+ usage("simple")
+ compile("simple")
{
val noContext = Context(cbtHome ++ "/test/nothing", Seq(), logger)
val b = new Build(noContext){
override def dependencies = Seq(
- MavenDependency("net.incongru.watchservice","barbary-watchservice","1.0")(logger),
- MavenDependency("net.incongru.watchservice","barbary-watchservice","1.0")(logger)
+ JavaDependency("net.incongru.watchservice","barbary-watchservice","1.0"),
+ JavaDependency("net.incongru.watchservice","barbary-watchservice","1.0")
)
}
val cp = b.classpath