The result of executing a build, via the GradleRunner.
Type | Name and description |
---|---|
String |
getStandardError() The textual error output produced during the build (i.e. text written to System.err). |
String |
getStandardOutput() The textual output produced during the build. |
List<BuildTask> |
getTasks() The tasks that were part of the build. |
BuildTask |
task(String taskPath) Returns the result object for a particular task, or null if the given task was not part of the build. |
List<String> |
taskPaths(TaskOutcome outcome) The paths of the subset of getTasks() that had the given outcome. |
List<BuildTask> |
tasks(TaskOutcome outcome) The subset of getTasks() that had the given outcome. |
The textual error output produced during the build (i.e. text written to System.err).
During a build, Gradle itself does not write its output to the error output stream. However, tools used by the build, as well as processes forked by the build (who's output is forwarded) may write to the error output stream.
If the build fails to start, due to an invalid argument for example, the message will be written to the error output and hence available here.
The textual output produced during the build.
This is equivalent to the console output produced when running a build from the command line, except for any error output (which is available via getStandardError()).
-q
)The tasks that were part of the build.
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.
Returns the result object for a particular task, or null
if the given task was not part of the build.
taskPath
- the path of the target tasknull
if the task was not executedThe paths of the subset of 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 outcomeThe subset of 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