OutOperationRequest
interface OutOperationRequest<FileTypeT : FileSystemLocation?>
Operations performed by a Task
with a single RegularFile
or Directory
output.
Task
is not consuming existing version of the target SingleArtifact
.
Summary
Public functions |
|
---|---|
Unit |
<ArtifactTypeT : Artifact.Multiple<FileTypeT?>? & Artifact.Appendable?> toAppendTo( Initiates an append request to a |
Unit |
<ArtifactTypeT : Artifact.Single<FileTypeT?>? & Artifact.Replaceable?> toCreate( Initiates a creation request for a single |
Public functions
toAppendTo
fun <ArtifactTypeT : Artifact.Multiple<FileTypeT?>? & Artifact.Appendable?> toAppendTo(
type: ArtifactTypeT?
): Unit
Initiates an append request to a Artifact.Multiple
artifact type.
Parameters | |
---|---|
type: ArtifactTypeT? |
The The artifact type must be As an example, let's take a abstract class MyTask: DefaultTask() { and an ArtifactType defined as follows : sealed class ArtifactType<T: FileSystemLocation>( You can then register the above task as a Provider of val taskProvider= projects.tasks.register(MyTask::class.java, "appendTask") |
toCreate
fun <ArtifactTypeT : Artifact.Single<FileTypeT?>? & Artifact.Replaceable?> toCreate(
type: ArtifactTypeT?
): Unit
Initiates a creation request for a single Artifact.Replaceable
artifact type.
Parameters | |
---|---|
type: ArtifactTypeT? |
The The artifact type must be A creation request does not care about the existing producer, since it replaces the existing producer. Therefore the existing producer task will not execute (unless it produces other outputs). Please note that when such replace requests are made, the You cannot replace the For example, let's take a abstract class MyTask: DefaultTask() { An sealed class ArtifactType<T: FileSystemLocation>(val kind: ArtifactKind) { You can register a transform to the collection of val taskProvider= projects.tasks.register(MyTask::class.java, "replaceTask") |