Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Forked from gseitz/build.scala
Created April 2, 2013 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuwei-k/5289416 to your computer and use it in GitHub Desktop.
Save xuwei-k/5289416 to your computer and use it in GitHub Desktop.
import sbt._
import Keys._
import Build.data
object build extends Build {
lazy val runAll = TaskKey[Unit]("run-all")
lazy val standardSettings = Seq(
runAllIn(Compile)
)
def runAllIn(config: Configuration) = {
runAll in config <<= (discoveredMainClasses in config, runner in run, fullClasspath in config, streams) map {
(classes, runner, cp, s) => classes.foreach(c => runner.run(c, data(cp), Seq(), s.log))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment