java
3 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
java/toolchain-declared | warning | The build selects the JDK it compiles with through a Java toolchain, instead of using whichever JDK launched it. |
java/version-declared | warning | The build declares the Java release it compiles for, and that release is no older than the configured floor. |
java/version-reproducible | warning | The Java release is declared through a mechanism that provisions the JDK, not one that asks the running JDK to target an older release. |
Shared inputs
Every java guardrail declares these inputs. Individual guardrails can add their own.
| Input | Description | Default |
|---|---|---|
projectDir | Directory holding the project, relative to the directory the CLI runs in. | . |
Shared collectors
Every java guardrail receives the facts these collectors gather. Individual guardrails can ask for more collectors of their own.
| Collector | Gathers |
|---|---|
java | The Java version the Gradle or Maven build declares, how it declares it, and whether that mechanism makes the build reproducible, for the project and for every Gradle project it includes. |
You configure every guardrail in this category the same way, in the guardrails.checks array of buildnote.json. Configuring guardrails lists every option, and Guardrails lets you search the whole library.