aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-04-02 15:17:36 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-04-02 15:17:36 -0400
commit10c156d83bb24486df6c040b514d072bf6b112d5 (patch)
tree6abfc2ed51fbf96e2444498bb09d45049cf014a3 /stage2/BasicBuild.scala
parentb9f8ff66c9e61daab016cc8e595f388f449ec780 (diff)
downloadcbt-10c156d83bb24486df6c040b514d072bf6b112d5.tar.gz
cbt-10c156d83bb24486df6c040b514d072bf6b112d5.tar.bz2
cbt-10c156d83bb24486df6c040b514d072bf6b112d5.zip
only compile and only produce jars if there are actually files.
This seem desirable, but also fixes a test failure for which I have no idea why it didn't fail before but now.
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 27de538..9ed8c26 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -116,7 +116,7 @@ class Build(val context: Context) extends Dependency with TriggerLoop{
override def dependencyClasspath : ClassPath = ClassPath(localJars) ++ super.dependencyClasspath
override def dependencyJars : Seq[File] = localJars ++ super.dependencyJars
- def exportedClasspath : ClassPath = ClassPath(Seq(compile))
+ def exportedClasspath : ClassPath = ClassPath(compile.toSeq:_*)
def targetClasspath = ClassPath(Seq(compileTarget))
def exportedJars: Seq[File] = Seq()
// ========== compile, run, test ==========
@@ -132,8 +132,8 @@ class Build(val context: Context) extends Dependency with TriggerLoop{
)
}
- private object compileCache extends Cache[File]
- def compile: File = compileCache{
+ private object compileCache extends Cache[Option[File]]
+ def compile: Option[File] = compileCache{
lib.compile(
needsUpdate,
sourceFiles, compileTarget, compileStatusFile, dependencyClasspath, scalacOptions,