visit

open override fun visit(artifact: TextOutputArtifact): File

Saves an OutputArtifact to a file with text content.

Return

the file itself


open override fun visit(artifact: BinaryOutputArtifact): File


open override fun visit(artifact: FileReferenceOutputArtifact): File

Exports a FileReferenceOutputArtifact to the output location. If the source is a directory, it is copied recursively.

Resolution order:

  1. If FileReferenceOutputArtifact.symlink is set and the platform supports symbolic links, a link is created instead of copying.

  2. Otherwise, if FileReferenceOutputArtifact.useChecksumInvalidation is enabled, a sibling .checksum file is maintained next to the output; the copy is skipped when the source's checksum matches the stored value. This avoids redundant I/O for large assets (fonts, third-party libraries) that rarely change between builds.

  3. Otherwise, the source is copied unconditionally.

Return

the copied file or directory


open override fun visit(group: OutputResourceGroup): File

Saves an OutputResourceGroup to a directory which contains its nested files.

Return

the directory file itself