github sbt/sbt-buildinfo v0.11.0
0.11.0

latest release: v0.12.0
2 years ago

Changes with compatibility implications

sbt-buildinfo 0.11.0 removes import scala.Predef._ from the generated code to fix the compatibility with new Scala 3 syntax.
If import scala.Predef._ is needed, use BuildInfoOption.ImportScalaPredef:

buildInfoOptions += BuildInfoOption.ImportScalaPredef

This was contributed by @martingd in #180

Java renderers

sbt-buildinfo 0.11.0 introduces two flavors to Java renders.

buildInfoRenderFactory := JavaSingletonRenderer.apply

This generates Java source code using singleton pattern:

package hello;

/** This file was generated by sbt-buildinfo. */
public final class BuildInfo {
  private BuildInfo() {}

  public static final BuildInfo instance = new BuildInfo();
  /** The value is "helloworld". */
  public final String name = "helloworld";
}
buildInfoRenderFactory := JavaStaticFieldsRenderer.apply

This generates Java source code using static fields:

package hello;

/** This file was generated by sbt-buildinfo. */
public final class BuildInfo {
  private BuildInfo() {}

  /** The value is "helloworld". */
  public static final String name = "helloworld";
}

These were contributed by @arixmkii in #167

What's Changed

  • Adds Java time objects as valid BuildInfoKey values by @nMoncho in #178
  • Fixes typo (can can) by @gokyo in #174
  • Fixes generated target file by @gokyo in #175
  • Removes unnecessary variable name by @gokyo in #176
  • Adds documentation for options PackagePrivate and ConstantValue. by @martingd in #181

New Contributors

Full Changelog: v0.10.0...v0.11.0

Don't miss a new sbt-buildinfo release

NewReleases is sending notifications on new releases.