Skip to content

Instantly share code, notes, and snippets.

@teigen
Created December 5, 2011 20:00
Show Gist options
  • 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