Skip to content

0.8.0

Compare
Choose a tag to compare
@eed3si9n eed3si9n released this 22 Feb 04:11
· 138 commits to develop since this release
v0.8.0

sbt-buildinfo 0.8.0 is published for sbt 1.

BuildInfoKey.of(...) and BuildInfoKey.ofN(...)

Prior to 0.8.0 when sbt-buildinfo generated the BuildInfo object using tasks, it was executing the tasks out-of-graph.
This would occasionally cause race conditions when used with side-effecty tasks.

To workaround this issue sbt-buildinfo introduces a new BuildInfokey.of(...) and BuildInfoKey.ofN(...) macro that will safely execute the tasks within the control of the task engine.

Before 0.8.0

lazy val root = (project in file("."))
  .enablePlugins(BuildInfoPlugin)
  .settings(
    buildInfoKeys := Seq[BuildInfoKey](name, version, someTask),
    buildInfoPackage := "hello"
  )

After 0.8.0

lazy val root = (project in file("."))
  .enablePlugins(BuildInfoPlugin)
  .settings(
    buildInfoKeys := BuildInfoKey.ofN(name, version, someTask),
    buildInfoPackage := "hello"
  )

This feature was contributed by @dwijnand as #114