You would define a custom task that depends on the test tasks you want to run. For example, you might redefine the root project test task as:
val select = ScopeFilter(
inAggregates(root, includeRoot = false),
inConfigurations(Test)
)
test in Test := test.all(select).value
> > That doesn't help if you aren't on 0.13 of course, but if that is what you
> > want, we can approximate it in 0.12.
> >
>
> I've tried updating our project to 0.13-RC4, but one of the plugins we use
> doesn't have a build for it yet. What would be the 0.12 approximate?
test in Test <<= Defaults.forDependencies(proj => test in proj in Test, includeRoot = false, classpath = true, aggregate = false) { tasks =>
tasks.join.map(_ => ())
}
This defines a test task that depends on the test tasks in all transitive dependencies of the current project. classpath=true means the dependencies are the standard x.dependsOn(y) dependencies. Set aggregate=true to also include x.aggregate(y) dependencies.
The first proj => ... defines what key is selected given a project proj. forDependencies returns the tasks but doesn't evaluate them, so this is what the tasks.join is for. map(_ => ()) discards the Seq[Unit] obtained as a result of evaluating the multiple test tasks.
-Mark