Skip to content

Instantly share code, notes, and snippets.

@duboisf
Created June 14, 2011 10:59
Show Gist options
  • Save duboisf/1024681 to your computer and use it in GitHub Desktop.
Save duboisf/1024681 to your computer and use it in GitHub Desktop.
sbt uninitialized sources setting
import sbt._
import Keys._
object Test extends Build {
lazy val listSources = TaskKey[Unit]("list-sources")
def listSourcesTask =
listSources <<= sources map { _ foreach println }
lazy val root = Project(
"root",
file("."),
settings = Defaults.defaultSettings ++ Seq(listSourcesTask)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment