Maven group, Java packages and Gradle plugin id move to `de.javagil.werkcrappit`. No change of behaviour. Old versions 0.2.0–0.3.1 under `de.hoennig.werkcrappit` stay in the registry for pinned builds. Consumers change two lines: plugin id `de.javagil.werkcrappit` and version 0.4.0 (or `de.javagil.werkcrappit:werkcrappit-pit:0.4.0`). CI on werkator.javagil.de: green. PR-doc: `docs/prs/2026-10-02-PR#11-rename-to-javagil.md` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: mhoennig <michael@hoennig.de> Reviewed-on: #11
2.9 KiB
ADR 0005: Gradle Integration and Gate
- Status: accepted
- Date: 2026-10-01
- PR: #7
Context
The specification (6.4, 6.5) wants a thin Gradle integration on top of the existing info.solidsoft.pitest plugin and an opt-in gate that runs after PIT has finished, judging werkcrappit's own report.
Decision
Plugin de.javagil.werkcrappit. Applied next to info.solidsoft.pitest, it:
- adds
de.javagil.werkcrappit:werkcrappit-pitof its own version to PIT'spitestconfiguration; - adds the output format
WERKCRAPPIT_MUTATION_CRAPto thepitesttask, keeping the configured formats, or PIT's defaultHTMLif none are configured; - passes the
werkcrappit { … }options into PIT'spluginConfiguration, keeping the entries of other plugins; the analysis context defaults to<project path>:pitest; - registers
mutationCrapCheck, which depends onpitest.
The PIT plugin sets the task's formats and plugin configuration to its extension's values, which are missing unless a build configures them, and adding to a missing Gradle collection property leaves it missing. So the plugin derives both from the PIT extension instead of adding to the task.
Not attached to check. PIT is expensive; a CI that wants the gate runs mutationCrapCheck explicitly.
Gate. mutationCrapCheck reads mutation-crap.json and calls Gate, which lives in werkcrappit-pit next to the report contract.
It compares the exact fraction of every score; it never recomputes the formula.
The rules are those of specification 6.4:
- No
maxMutationCrap: the gate is inactive and never fails because of a score. - A scored, not excluded method violates the limit exactly when its value is greater; equality passes.
- A missing, unfinished or unreadable report, an unsupported schema version, an incomplete scope, an
INCONCLUSIVEorCOMPLEXITY_UNAVAILABLEmethod is an analysis error, reported as such and not as poor test quality. NO_MUTATION_RESULTSandNO_ELIGIBLE_MUTANTSare noted, never judged.- No scored method at all fails as an empty evaluation, unless
allowEmptyis set; it is reported only when no other analysis error explains it. - The gate depends on
pitest; when PIT fails, Gradle never runs it, and a run that died inside PIT left aRUNNINGreport (ADR 0004).
Up to date. The gate declares no outputs and always runs; judging is cheap.
The limit is not an input of pitest, so changing it does not repeat PIT.
Multi-project builds. Each project has its own pitest task, report directory, context and gate; nothing is merged across projects.
Consequences
- A build that configures the
pitesttask'soutputFormatsorpluginConfigurationdirectly, instead of thepitestextension, has those values replaced; the README says to use the extension. maxMutationCrapaccepts any number; it is converted through its decimal text, so10.92stays10.92.