TaskBasedOperation
interface TaskBasedOperation<TaskT : Task?>
Interface with methods to wire input and output method references to Task
-based operations.
A Task
-based operation will create, transform, or append files or directories to public SingleArtifact
to customize or participate in the build flow.
Each operation should indicate through the methods of this interface which method can be used to set or retrieve the Task
inputs and outputs.
Summary
Public functions |
|
---|---|
OutOperationRequest<FileTypeT> |
<FileTypeT : FileSystemLocation?> wiredWith( Sets the |
CombiningOperationRequest<FileTypeT> |
<FileTypeT : FileSystemLocation?> wiredWith( Sets the |
InAndOutDirectoryOperationRequest<TaskT> |
wiredWithDirectories( Sets the |
InAndOutFileOperationRequest |
wiredWithFiles( Sets the |
Public functions
wiredWith
fun <FileTypeT : FileSystemLocation?> wiredWith(
taskOutput: ((TaskT) -> FileSystemLocationProperty<FileTypeT>)?
): OutOperationRequest<FileTypeT>
Sets the TaskT
output method reference so the TaskT
result can be retrieved after successful task execution.
This method is useful when creating a new version, when appending to existing artifacts, or when access to the current version of an artifact isn't required.
Parameters | |
---|---|
taskOutput: ((TaskT) -> FileSystemLocationProperty<FileTypeT>)? |
The method reference to retrieve the task output after successful task execution. |
Returns | |
---|---|
OutOperationRequest<FileTypeT> |
The |
wiredWith
fun <FileTypeT : FileSystemLocation?> wiredWith(
taskInput: ((TaskT) -> ListProperty<FileTypeT>)?,
taskOutput: ((TaskT) -> FileSystemLocationProperty<FileTypeT>)?
): CombiningOperationRequest<FileTypeT>
Sets the TaskT
input and output methods references so the Task
can retrieve the current versions of a Artifact.Multiple
when invoking taskInput
while producing a new version of the same artifact type accessible through the taskOutput
method after successful execution.
This method is useful when TaskT
is combining all elements of an SingleArtifact
into a single element.
Parameters | |
---|---|
taskInput: ((TaskT) -> ListProperty<FileTypeT>)? |
The method reference the |
taskOutput: ((TaskT) -> FileSystemLocationProperty<FileTypeT>)? |
The method reference to retrieve the task output after successful task execution. |
Returns | |
---|---|
CombiningOperationRequest<FileTypeT> |
The |
wiredWithDirectories
fun wiredWithDirectories(
taskInput: ((TaskT) -> DirectoryProperty)?,
taskOutput: ((TaskT) -> DirectoryProperty)?
): InAndOutDirectoryOperationRequest<TaskT>
Sets the TaskT
input and output methods references so the Task
can retrieve the current version of the target SingleArtifact
when invoking taskInput
. TaskT
will also produce a new version of the same artifact type accessible through the taskOutput
method after successful execution.
This method is useful when TaskT
is transforming an SingleArtifact
from its current version to a new one and the SingleArtifact
's Artifact.kind
is Artifact.DIRECTORY
Parameters | |
---|---|
taskInput: ((TaskT) -> DirectoryProperty)? |
The method reference the |
taskOutput: ((TaskT) -> DirectoryProperty)? |
The method reference to retrieve the task output after successful task execution. |
Returns | |
---|---|
InAndOutDirectoryOperationRequest<TaskT> |
The |
wiredWithFiles
fun wiredWithFiles(
taskInput: ((TaskT) -> RegularFileProperty)?,
taskOutput: ((TaskT) -> RegularFileProperty)?
): InAndOutFileOperationRequest
Sets the TaskT
input and output methods references so the Task
can retrieve the current version of the target SingleArtifact
when invoking taskInput
. TaskT
will also produce a new version of the same artifact type accessible through the taskOutput
method after successful execution.
This method is useful when TaskT
is transforming an SingleArtifact
from its current version to a new one and the SingleArtifact
's Artifact.kind
is Artifact.FILE
Parameters | |
---|---|
taskInput: ((TaskT) -> RegularFileProperty)? |
The method reference the |
taskOutput: ((TaskT) -> RegularFileProperty)? |
The method reference to retrieve the task output after successful task execution. |
Returns | |
---|---|
InAndOutFileOperationRequest |
The |