diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-04-03 00:09:19 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-04-03 00:09:26 -0400 |
commit | 83d6e39764103bde44d5812aa873ed7537cc8c97 (patch) | |
tree | 60a070ef1511aa525cec9bf4c19034804b829679 /stage1/Stage1.scala | |
parent | 8eae49b7b0a39f23518680b56429314db3d977e1 (diff) | |
download | cbt-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 'stage1/Stage1.scala')
-rw-r--r-- | stage1/Stage1.scala | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/stage1/Stage1.scala b/stage1/Stage1.scala index 368a459..050d494 100644 --- a/stage1/Stage1.scala +++ b/stage1/Stage1.scala @@ -57,24 +57,15 @@ object Stage1{ val lib = new Stage1Lib(logger) import lib._ - - val sourceFiles = stage2.listFiles.toVector.filter(_.isFile).filter(_.toString.endsWith(".scala")) - val changeIndicator = stage2Target ++ "/cbt/Build.class" - - val deps = Dependencies( - JavaDependency("net.incongru.watchservice","barbary-watchservice","1.0"), - JavaDependency("org.eclipse.jgit", "org.eclipse.jgit", "4.2.0.201601211800-r") - ) - val classLoaderCache = new ClassLoaderCache(logger) + val sourceFiles = stage2.listFiles.toVector.filter(_.isFile).filter(_.toString.endsWith(".scala")) val cbtHasChanged = _cbtChanged || lib.needsUpdate(sourceFiles, stage2StatusFile) logger.stage1("Compiling stage2 if necessary") - val scalaXml = JavaDependency("org.scala-lang.modules","scala-xml_"+constants.scalaMajorVersion,constants.scalaXmlVersion) compile( cbtHasChanged, sourceFiles, stage2Target, stage2StatusFile, - nailgunTarget +: stage1Target +: Dependencies(deps, scalaXml).classpath, + CbtDependency().dependencyClasspath, Seq("-deprecation"), classLoaderCache, zincVersion = "0.3.9", scalaVersion = constants.scalaVersion ) |