sbt plugin to generate Scala source from your build definitions.
- Github project: https://github.com/sbt/sbt-buildinfo
Usage
Add the following in your build.sbt
:
buildInfoSettings
sourceGenerators in Compile <+= buildInfo
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
buildInfoPackage := "hello"
This generates the following:
package hello
case object BuildInfo {
val name = "helloworld"
val version = "0.1-SNAPSHOT"
val scalaVersion = "2.9.2"
val sbtVersion = "0.12.0"
}