sbt/sbt-buildinfo
59.5
Adequate · 6 November 2026
1.1k
lines of production code
Scala
primary language
4
measurements over time
What this system is
This system is an sbt plugin designed to automatically generate build information source files during the compilation process. It supports multiple output formats, including Scala case classes and objects, as well as Java singletons and static fields, with configurable options for traits, JSON/Map generation, and build timestamps. The plugin handles complex build scenarios such as multi-project setups, task graph execution, and caching, while maintaining compatibility with both Scala 2 and Scala 3.
How it got here
2012 — build infrastructure and API modernization
6 changes.
The project modernized its build infrastructure by upgrading to sbt 1.13.0 and replacing legacy plugins with automated publishing and CI integration tools. The core build-info generation engine was rewritten to support modern sbt features, Scala 3, and multiple output formats, introducing a new task-based API. Comprehensive scripted tests were added to verify correct behavior across various configurations, renderers, and multi-project setups.
2013–2017 — scripted test coverage expansion
5 changes.
This period focused on expanding the test suite for the sbt-buildinfo plugin by adding multiple scripted tests. These tests verified specific features such as caching behavior, custom trait support, constant value options, and package path configuration to ensure correct generation of BuildInfo.scala files.
2018–2024 — Scala 3 compatibility and test expansion
6 changes.
This period focused on adding Scala 3 compatibility to the sbt-buildinfo plugin by implementing a specific compatibility layer for build info keys and macros. Concurrently, the team significantly expanded test coverage by adding scripted and compile-only tests to verify task execution order, Java renderer behavior, import skipping options, and subproject scoped key handling.
Behavioural changes
Major refactoring of build-info generation engine and API
The sbt-buildinfo plugin has been completely rewritten to support modern sbt features and multiple output formats. The core API has changed: \BuildInfoKey\ is now a sealed trait with specific entry types (Setting, Task, TaskValue, Constant, Action, Mapped) replacing the previous flat key system, and the old \BuildInfoKey.of\/\ofN\ methods are deprecated in favor of \+=\ and \++=\. A new \BuildInfoRenderer\ abstraction allows generating code for Scala (Case Class, Case Object, Scala 3 variants) and Java (Singleton, Static Fields), with automatic selection of Scala 3 renderers when appropriate. New options include \BuildTime\ (adds \builtAtString\/\builtAtMillis\), \ToMap\, \ToJson\, \Traits\ (to make the generated object implement custom traits), \PackagePrivate\, \ConstantValue\, and \ImportScalaPredef\. The plugin now uses a task-based \buildInfoValues\ to expose raw key/value results for use in the build itself (e.g., for JAR manifests) and supports generating resources into \resourceManaged\. Compatibility with sbt 2.x and Scala 3 is added via \PluginCompat\ and specific Scala 3 renderers.
src/main/scala · high confidence
Scala 3 compatibility layer for sbt build info keys
Added Scala 3-specific implementations of the build info key system (BuildInfoKey, Entry, and PluginCompat) to ensure correct behavior with sbt 2.x. This change introduces a compatibility layer that handles Scala 3's macro and type system requirements, specifically ensuring that task keys are expanded correctly within setting macros to run as part of the build process rather than separately, and providing necessary implicit conversions and type aliases for sbt 2.x integration.
src/main/scala-3 · high confidence
Test coverage
Add scripted tests for sbt-buildinfo plugin features; Added compile-only test for BuildInfoKey syntax; Added scripted test for BuildInfo generation in subdirectory; Added scripted test for BuildInfo options; Added scripted test for BuildInfoOption.ConstantValue; Added scripted test for buildInfoUsePackageAsPath; Added scripted test for buildinfo caching behavior; Added scripted test for case class renderer with custom trait support; Added scripted test for multi-project BuildInfo generation; Added scripted test for sbt-buildinfo task execution order; Added scripted tests for Java singleton and static fields renderers; Added scripted tests for sbt-buildinfo; Added scripted tests for sbt-buildinfo import skipping scenarios; Added test for subproject scoped key handling.
Dependencies
Updated build infrastructure and removed legacy plugins
The project's build configuration has been updated to use sbt version 1.13.0 and introduced new plugins: sbt-salad-days (0.2.0) for automated publishing and sbt-ci-release (1.12.1) for CI integration. Additionally, the legacy ls-sbt plugin and its associated custom resolvers have been removed from the build definition.
project · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 60 (-2.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 52 → 49 (-2.5)
- Readiness 62 → 62 (+0.0)
- Security 82 → 69 (-12.3)
Resolved (5)
- Documentation: no architecture or design documentation (README.markdown)
- Documentation: no project overview (README.markdown)
- Inconsistent Return Type for Rendering: All renderers implement renderKeys returning Seq[String]. However, BuildInfoRenderer trait defines renderKeys(infoKeysNameAndValues: Seq[BuildInfoResult]): Seq[String]. While consistent in signature, the naming renderKeys vs the input infoKeysNameAndValues/buildInfoResults is slightly inconsistent in parameter naming across implementations, though this is minor. More importantly, Scala3CaseObjectRenderer has an additional toStringLines method not present in others, which might be internal helper but is exposed.
- Off-boarding risk: anonymized user #1
- Redundant/Confusing TaskKey handling: BuildInfoKey.apply accepts TaskKey directly, but there is also a specific outOfGraphUnsafe method for TaskKey. It is unclear why apply handles TaskKey safely while outOfGraphUnsafe exists, or if outOfGraphUnsafe is just an alias for a specific unsafe behavior of apply. This creates ambiguity about which method to use for TaskKeys.
New (1)
- Off-boarding risk: anonymized user #1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sbt/sbt-buildinfo was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 8a3d310d9acce1688d6fca2633cf78515026887d — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.