BuildTool
interface in io.mutastic.api
interface BuildToolA build tool mutastic reads a project’s setup from, found with java.util.ServiceLoader: each
is asked in turn whether a directory is one of its builds.
Constants
DEFAULT_SUITE
static String DEFAULT_SUITEThe test suite a run uses unless told otherwise: Gradle’s test task, Maven’s Surefire.
Methods
name
String name()Gradle: how messages name it.
buildFiles
String buildFiles()The files that make a directory one of its builds, as a person would look for them:
settings.gradle(.kts) or build.gradle(.kts).
recognises
boolean recognises(Path directory)Whether directory is one of its builds.
workDirectory
Path workDirectory(Path directory, String module)Where a module keeps mutastic’s run record, logs and reports, so each module keeps its own:
build/mutastic for the build in directory, build/mutastic/data for :data.
dependents
default List<String> dependents(Path directory, String module, Path workDirectory)The modules whose tests can reach module’s code: the ones that depend on it, directly or
through others, in the tool’s own names for them (:app).
read
Project read(Path directory, String module, Path workDirectory, String typed)The module’s code and tests, and how its build runs them.
module | : for the build in directory, else the module as the tool names it |
|---|---|
typed | the directory as the person would type it, for the commands a failure suggests |
Throws SetupFailed | when the build can’t be read, saying what to do instead |
read
default Project read(BuildTool.Request request)The module’s code and the tests of one of its suites, and how its build runs them. A tool with
one suite has only DEFAULT_SUITE.
Throws SetupFailed | when the build has no such suite, saying which it has |
|---|
read
Project read(Path directory, String module, Path setup)The module’s code and tests from setup, a file in ProjectSetup’s format the build already
wrote: for an entry point inside the build, such as a build plugin, which needn’t run it
again. Named as read(Path, String, Path, String) names it, so their runs compare.