Auto plugins are available only for sbt 0.13.5 and above.
If you are using multi-project build.sbt
(before):
lazy val commonSettings = Seq(
version := "0.1-SNAPSHOT",
organization := "com.example",
scalaVersion := "2.10.1"
)
lazy val app = (project in file("app")).
settings(commonSettings: _*).
settings(buildInfoSettings: _*).
settings(
sourceGenerators in Compile <+= buildInfo,
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion),
buildInfoPackage := "hello"
// your settings here
)
- Remove
settings(buildInfoSettings: _*).
. - Remove
sourceGenerators in Compile <+= buildInfo,
- Add
enablePlugins(BuildInfoPlugin)
.
Here's how build.sbt looks now:
lazy val commonSettings = Seq(
version := "0.1-SNAPSHOT",
organization := "com.example",
scalaVersion := "2.10.1"
)
lazy val app = (project in file("app")).
enablePlugins(BuildInfoPlugin).
settings(commonSettings: _*).
settings(
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion),
buildInfoPackage := "hello",
// your settings here
)