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
- @arixmkii made their first contribution in #167
- @gokyo made their first contribution in #173
- @rtyley made their first contribution in #179
- @martingd made their first contribution in #181
- @nMoncho made their first contribution in #178
Full Changelog: v0.10.0...v0.11.0