Package io.github.joke.conventionalversion.git
@NullMarked
package io.github.joke.conventionalversion.git
Gathers repository facts by running
git.
The CLI rather than a library: JGit would be the only entry on a consuming build's buildscript
classpath, and the real client already handles worktrees, submodules and safe.directory
correctly. Requiring git on the PATH is a fair precondition for a plugin whose
whole purpose is reading git.
Unit tested and mutation tested like any other package. Running git is a collaboration, not an obstacle to testing: the command runner is spied to stub the spawn, and everything above it is asserted against a mocked runner - including the exact argument list each read sends to git.
-
ClassDescriptionA precondition the calculation cannot proceed without.Runs
gitin a directory and returns its standard output.The repository reads the calculation needs, each one git command.Gathers what the calculation needs, once per build, for every package at once.One package and the repository facts its own range yielded.