diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-01 23:53:08 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-01 23:53:08 -0500 |
commit | 0d98155071d75dd135adca9d5977b365088f8190 (patch) | |
tree | 7f1c88fb4f1f59fd394c15fa29a9e0fe271c607f /stage2/BasicBuild.scala | |
parent | e56f8afa03035140280bc8d3d878ad225def381e (diff) | |
download | cbt-0d98155071d75dd135adca9d5977b365088f8190.tar.gz cbt-0d98155071d75dd135adca9d5977b365088f8190.tar.bz2 cbt-0d98155071d75dd135adca9d5977b365088f8190.zip |
make full dependencies available to compile instead of only classpath
this will make it possible to access lastModified times and cache them
in the following commits
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r-- | stage2/BasicBuild.scala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 889e32d..8b4a3a5 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -59,7 +59,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge // FIXME: this should probably be removed Resolver( mavenCentral ).bind( "org.scala-lang" % "scala-library" % scalaVersion - ) + ) :+ BinaryDependency(localJars, Nil) // ========== paths ========== final private val defaultSourceDirectory = projectDirectory ++ "/src" @@ -115,11 +115,10 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge .flatMap(_.listFiles) .filter(_.toString.endsWith(".jar")) - override def dependencyClasspath : ClassPath = ClassPath(localJars) ++ super.dependencyClasspath + override def dependencyClasspath : ClassPath = super.dependencyClasspath - protected def compileDependencies: Seq[Dependency] = Nil - final def compileClasspath : ClassPath = - dependencyClasspath ++ ClassPath( compileDependencies.flatMap(_.exportedClasspath.files).distinct ) + protected def compileDependencies: Seq[Dependency] = dependencies + final def compileClasspath : ClassPath = Dependencies(compileDependencies).classpath def resourceClasspath: ClassPath = { val resourcesDirectory = projectDirectory ++ "/resources" @@ -148,7 +147,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge lib.compile( context.cbtHasChanged, needsUpdate || context.parentBuild.map(_.needsUpdate).getOrElse(false), - sourceFiles, compileTarget, compileStatusFile, compileClasspath, + sourceFiles, compileTarget, compileStatusFile, compileDependencies, context.paths.mavenCache, scalacOptions, context.classLoaderCache, zincVersion = zincVersion, scalaVersion = scalaVersion ) |