aboutsummaryrefslogtreecommitdiff
path: root/test/simple
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-04-03 00:09:19 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-04-03 00:09:26 -0400
commit83d6e39764103bde44d5812aa873ed7537cc8c97 (patch)
tree60a070ef1511aa525cec9bf4c19034804b829679 /test/simple
parent8eae49b7b0a39f23518680b56429314db3d977e1 (diff)
downloadcbt-83d6e39764103bde44d5812aa873ed7537cc8c97.tar.gz
cbt-83d6e39764103bde44d5812aa873ed7537cc8c97.tar.bz2
cbt-83d6e39764103bde44d5812aa873ed7537cc8c97.zip
Implement alternative resolvers
This commit also - requires Dependencies to explicitly implement canBeCached - unifies some logic for dependency downloading - moves SBT-like dependency DSL into its own trait - error message showing build directory for exceptions in builds Not splitting this up in favor of faster progress to 1.0. The user facing API can probably be slightly improved using implicits inside of BasicBuild, but we can do that later.
Diffstat (limited to 'test/simple')
-rw-r--r--test/simple/build/build.scala34
1 files changed, 25 insertions, 9 deletions
diff --git a/test/simple/build/build.scala b/test/simple/build/build.scala
index d3887b3..190bad9 100644
--- a/test/simple/build/build.scala
+++ b/test/simple/build/build.scala
@@ -1,14 +1,30 @@
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"),
- GitDependency("https://github.com/xdotai/diff.git", "2e275642041006ff39efde22da7742c2e9a0f63f"),
- // the below tests pom inheritance with dependencyManagement and variable substitution for pom properties
- JavaDependency("org.eclipse.jgit", "org.eclipse.jgit", "4.2.0.201601211800-r"),
- // the below tests pom inheritance with variable substitution for pom xml tag contents
- JavaDependency("com.spotify", "missinglink-core", "0.1.1")
- ) ++ super.dependencies
+ override def dependencies = (
+ super.dependencies
+ ++
+ Seq(
+ GitDependency("https://github.com/xdotai/diff.git", "8b501902999fe76d49e04937c4bd6d0b9e07b4a6"),
+ MavenRepository.central.resolve(
+ ScalaDependency("com.typesafe.play", "play-json", "2.4.4"),
+ MavenDependency("joda-time", "joda-time", "2.9.2"),
+ // the below tests pom inheritance with dependencyManagement and variable substitution for pom properties
+ MavenDependency("org.eclipse.jgit", "org.eclipse.jgit", "4.2.0.201601211800-r"),
+ // the below tests pom inheritance with variable substitution for pom xml tag contents
+ MavenDependency("com.spotify", "missinglink-core", "0.1.1")
+ ),
+ MavenRepository.combine(
+ MavenRepository.central,
+ MavenRepository.bintray("tpolecat"),
+ MavenRepository.sonatypeSnapshots
+ ).resolve(
+ "org.cvogt" %% "play-json-extensions" % "0.8.0",
+ "org.tpolecat" %% "tut-core" % "0.4.2",
+ "ai.x" %% "lens" % "1.0.0-SNAPSHOT"
+ )
+ )
+ )
}