aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-06-07 11:08:52 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-06-15 01:24:46 -0400
commit2716491ed0f3b90d520f84900358638fbfacf912 (patch)
treeda31003843610a29d241798097c552099358787f /stage2/BasicBuild.scala
parentad2094b06eb7e313b3655ae0cae98b50787177d3 (diff)
downloadcbt-2716491ed0f3b90d520f84900358638fbfacf912.tar.gz
cbt-2716491ed0f3b90d520f84900358638fbfacf912.tar.bz2
cbt-2716491ed0f3b90d520f84900358638fbfacf912.zip
add support for compile time only dependencies
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 3d27261..4be0e58 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -112,6 +112,9 @@ trait BaseBuild extends DependencyImplementation with BuildInterface with Trigge
override def dependencyClasspath : ClassPath = ClassPath(localJars) ++ super.dependencyClasspath
+ protected def compileDependencies: Seq[Dependency] = Nil
+ final def compileClasspath : ClassPath = ClassPath( compileDependencies.flatMap(_.exportedClasspath.files).distinct )
+
def exportedClasspath : ClassPath = ClassPath(compile.toSeq)
def targetClasspath = ClassPath(Seq(compileTarget))
// ========== compile, run, test ==========
@@ -131,7 +134,7 @@ trait BaseBuild extends DependencyImplementation with BuildInterface with Trigge
lib.compile(
context.cbtHasChanged,
needsUpdate || context.parentBuild.map(_.needsUpdate).getOrElse(false),
- sourceFiles, compileTarget, compileStatusFile, dependencyClasspath,
+ sourceFiles, compileTarget, compileStatusFile, dependencyClasspath ++ compileClasspath,
context.paths.mavenCache, scalacOptions, context.classLoaderCache,
zincVersion = zincVersion, scalaVersion = scalaVersion
)