Skip to content

Instantly share code, notes, and snippets.

@teigen
Created December 5, 2011 20:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save teigen/1435102 to your computer and use it in GitHub Desktop.
Save teigen/1435102 to your computer and use it in GitHub Desktop.
sbt multi setting example
lazy val yodawg = TaskKey[String]("yo-dawg", "I heard you liked settings, so I put a setting in your setting")
yodawg <<= Project.app(moduleName :^: version :^: isSnapshot :^: KNil){
case a :+: b :+: c :+: HNil => task(List(a, b, c).mkString("~"))
}
>show yo-dawg
[info] web~2.0-SNAPSHOT~true
// source: https://github.com/harrah/xsbt/blob/0.11/main/Structure.scala#L443
// real world usage: https://github.com/eed3si9n/scalaxb/blob/master/sbt-scalaxb/src/main/scala/sbtscalaxb/Plugin.scala#L76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment