0.11.0
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 https://github.com/sbt/sbt-buildinfo/pull/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: