Class DefaultTaskSuccessResult
- java.lang.Object
-
- org.gradle.tooling.events.internal.DefaultOperationSuccessResult
-
- org.gradle.tooling.events.task.internal.DefaultTaskSuccessResult
-
- All Implemented Interfaces:
OperationResult
,SuccessResult
,TaskExecutionResult
,TaskOperationResult
,TaskSuccessResult
- Direct Known Subclasses:
DefaultJavaCompileTaskSuccessResult
public class DefaultTaskSuccessResult extends DefaultOperationSuccessResult implements TaskSuccessResult
Implementation of theTaskSuccessResult
interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultTaskSuccessResult(long startTime, long endTime, boolean upToDate, boolean fromCache, TaskExecutionDetails taskExecutionDetails)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getExecutionReasons()
Returns the reasons why this task was executed.boolean
isFromCache()
Returns whether the output for this task was pulled from a build cache when using task output caching.boolean
isIncremental()
Returns whether this task was executed incrementally.boolean
isUpToDate()
Returns whether this task was up-to-date.-
Methods inherited from class org.gradle.tooling.events.internal.DefaultOperationSuccessResult
getEndTime, getStartTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.tooling.events.OperationResult
getEndTime, getStartTime
-
-
-
-
Constructor Detail
-
DefaultTaskSuccessResult
public DefaultTaskSuccessResult(long startTime, long endTime, boolean upToDate, boolean fromCache, TaskExecutionDetails taskExecutionDetails)
-
-
Method Detail
-
isUpToDate
public boolean isUpToDate()
Description copied from interface:TaskSuccessResult
Returns whether this task was up-to-date.- Specified by:
isUpToDate
in interfaceTaskSuccessResult
- Returns:
true
if this task was up-to-date
-
isFromCache
public boolean isFromCache()
Description copied from interface:TaskSuccessResult
Returns whether the output for this task was pulled from a build cache when using task output caching.NOTE: This will always be false if the Gradle version does not support task output caching.
- Specified by:
isFromCache
in interfaceTaskSuccessResult
- Returns:
true
if the output for this task was from a build cache
-
isIncremental
public boolean isIncremental()
Description copied from interface:TaskExecutionResult
Returns whether this task was executed incrementally.- Specified by:
isIncremental
in interfaceTaskExecutionResult
- Returns:
true
if this task was executed incrementally
-
getExecutionReasons
@Nullable public java.util.List<java.lang.String> getExecutionReasons()
Description copied from interface:TaskExecutionResult
Returns the reasons why this task was executed.- Specified by:
getExecutionReasons
in interfaceTaskExecutionResult
- Returns:
- the reasons why this task was executed; an empty list indicates the task was up-to-date;
null
that it failed before up-to-date checks had been performed.
-
-