public interface BuildResult
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BuildResult.Failure |
| Modifier and Type | Method and Description |
|---|---|
BuildResult |
asRichOutputResult()
Dilutes the build result to match a rich console, output scrapping, build result.
|
static BuildResult |
from(java.lang.String output)
Creates a build result from a textual output produced by a Gradle build.
|
java.util.List<java.lang.String> |
getExecutedTaskPaths()
Returns a list of task paths for all executed tasks (e.g.
|
java.util.List<BuildResult.Failure> |
getFailures()
Returns the failures in this build result, if any.
|
java.lang.String |
getOutput()
The textual output produced during the build.
|
java.util.List<java.lang.String> |
getSkippedTaskPaths()
Returns a list of task paths for all skipped tasks (e.g.
|
java.util.List<BuildTask> |
getTasks()
The tasks that were part of the build.
|
BuildTask |
task(java.lang.String taskPath)
Returns the result object for a particular task, or
null if the given task was not part of the build. |
java.util.List<BuildTask> |
tasks(TaskOutcome outcome)
The subset of
getTasks() that had the given outcome. |
BuildResult |
withNormalizedTaskOutput(java.util.function.Predicate<TaskPath> predicate,
java.util.function.UnaryOperator<java.lang.String> outputNormalizer)
Returns a new build result with the task output matching the predicate normalized by the output normalizer.
|
BuildResult |
withoutBuildSrc()
Returns a new build result without the tasks executed from the buildSrc included build.
|
java.lang.String getOutput()
This is equivalent to the console output produced when running a build from the command line. It contains both the standard output, and standard error output, of the build.
-q)java.util.List<java.lang.String> getExecutedTaskPaths()
java.util.List<java.lang.String> getSkippedTaskPaths()
static BuildResult from(java.lang.String output)
output - the textual output produced by a Gradle build.BuildResult representing the output, never null.java.util.List<BuildTask> getTasks()
The order of the tasks corresponds to the order in which the tasks were started. If executing a parallel enabled build, the order is not guaranteed to be deterministic.
The returned list is an unmodifiable view of items. The returned list will be empty if no tasks were executed. This can occur if the build fails early, due to a build script failing to compile for example.
java.util.List<BuildTask> tasks(TaskOutcome outcome)
getTasks() that had the given outcome.
The returned list is an unmodifiable view of items. The returned list will be empty if no tasks were executed with the given outcome.
outcome - the desired outcome@Nullable BuildTask task(java.lang.String taskPath)
null if the given task was not part of the build.taskPath - the path of the target tasknull if the task was not executedBuildResult withNormalizedTaskOutput(java.util.function.Predicate<TaskPath> predicate, java.util.function.UnaryOperator<java.lang.String> outputNormalizer)
predicate - a predicate matching tasks based on their task path.outputNormalizer - an output normalizer to use for normalizing the task output.BuildResult with the matching task output normalized, never null.BuildResult withoutBuildSrc()
BuildResult without any tasks from buildSrc, never null.BuildResult asRichOutputResult()
BuildResult without outputless tasks, never null.java.util.List<BuildResult.Failure> getFailures()