sbt-buildinfo v0.10.0 Release Notes
Release Date: 2020-08-09 // almost 6 years ago-
๐ฅ Breaking change: scala.collection.immutable.Seq
sbt-buidinfo 0.10.0 will generate
scala.collection.immutable.Seq(...)instead ofscala.collection.Seq(...).๐ This was contributed as #150 by @smarter.
๐ฅ Breaking change: output local time
๐ sbt-buildinfo 0.10.0 will output build time in local time (using JSR-310
java.time.Instant) with timezone string.buildInfoOptions += BuildInfoOption.BuildTime๐ This was contributed as #156/#157 by @xerial and @leviramsey
๐ BuildInfoOption.PackagePrivate
buildInfoOptions += BuildInfoOption.PackagePrivate๐ sbt-buidinfo 0.10.0 adds a new option to make
BuildInfopackage private. This was contributed as #151 by @pcejrowski.๐ BuildInfoOption.ConstantValue
buildInfoOptions ++= Seq(BuildInfoOption.ConstantValue, BuildInfoOption.PackagePrivate)๐ sbt-buidinfo 0.10.0 adds a new option to make
BuildInfofields constant value definitions when possible.package helloimport scala.Predef.\_private[hello] case object BuildInfo {/\*\* The value is "helloworld". \*/final val name = "helloworld"/\*\* The value is "0.1". \*/final val version = "0.1" .... }๐ We recommend making
BuildInfopackage private if you use this option. #164 by @eed3si9n๐ bug fixes and updates
Previous changes from v0.9.0
-
๐ sbt-buildinfo 0.9.0 is published for sbt 1.
๐
TaskKeytoBuildInfoKeyconversion potentially breaking semantic changeTL;DR No need for
BuildInfoKey.of(...)orBuildInfoKey.ofN(...)any more. UseBuildInfoKey.outOfGraphUnsafeif your build definition is now circular.๐ sbt-buildinfo 0.8.0 deprecated the original
TaskKey[A]toBuildInfoKey.Entry[A]implicit and explicit conversions (BuildInfoKey.taskandBuildInfoKey.applyrespectively), that executed the underlying sbt Task out of sbt's task graph execution, in favour of a newly introducedBuildInfoKey.of(...)andBuildInfoKey.ofN(...)API, which correctly wired up the task graph. See #114.๐ As it was implemented (and released) it interacted poorly with sbt-buildinfo's
BuildInfoKey.mapAPI (#117), due to a mistake in the implementation and test coverage.๐ In resolving the issue it became clear that instead of introducing a new API, that required sbt-buildinfo users to change their source code to use, the already used conversions could have been modified to use the new Task-based semantics.
๐ However, this change breaks any build definition that declares as a build info key any
TaskKeythat depends onsourceGeneratorsorresourceGenerators, because the build definiton would now be circular and fail to load. To fix this breaking semantic change the user has to either drop the key used, choose another key, or fallback to the previous semantics by using the not-deprecatedBuildInfoKey.outOfGraphUnsafeAPI, also introduced in sbt-buildinfo 0.8.0.โ Add direct support for sbt's
Attributed๐ A number of keys defined by sbt use sbt's
Attributedtype, specifically the keys that define classpaths. Prior to this change defining any of these keys as a build info key would generateSeq[String]asAttributedwould be simply converted to string withtoString. sbt-buildinfo 0.9.0 introduces direct support for these keys so they generateSeq[File]instead.๐ Make
toJsonmore JSONish๐ sbt-buildinfo is able to generate
toJsonmethod using the following setting:buildInfoOptions += BuildInfoOption.ToJson๐ sbt-buildinfo 0.9.0 makes the JSON encoding more natural:
"libraryDependencies" : [ "org.scala-lang:scala-library:2.12.4", "com.lihaoyi:acyclic:0.1.7:plugin->default(compile)", .....]๐ #123 by @tonicebrian
Do not generate multi-parameter infix calls
๐ Multi-parameter infix calls may be removed in the future, so it's better not to generate this kind of code.