Fix actions/join test

This commit is contained in:
Eugene Yokota 2015-10-01 03:03:44 -04:00
parent b92b2c7109
commit 4b154cbe7a
2 changed files with 20 additions and 12 deletions

View File

@ -0,0 +1,20 @@
lazy val intTask = taskKey[Int]("int")
lazy val root = (project in file(".")).
dependsOn(b, c).
settings(
intTask in Compile := {
// a sequence of tasks could be joined together
Seq(b, c).map(p => intTask in (p, Compile)).join.map( as => (1 /: as)(_ + _) ).value
}
)
lazy val b = (project in file("b")).
settings(
intTask in Compile := 1
)
lazy val c = (project in file("c")).
settings{
intTask in Compile := 2
}

View File

@ -1,12 +0,0 @@
import sbt._
import Keys._
import Import._
object Build extends Build
{
lazy val root = Project("root", file(".")) dependsOn(b,c) settings(
compile in Compile <<= Seq(b, c).map(p => compile in (p, Compile)).join.map( as => (inc.Analysis.Empty /: as)(_ ++ _) )
)
lazy val b = Project("b", file("b"))
lazy val c = Project("c", file("c"))
}