api / org.gradle.api.tasks / TaskOutputs / files

files

abstract fun files(vararg paths: Any): TaskOutputFilePropertyBuilder

Overrides CompatibilityAdapterForTaskOutputs.files

Registers some output files for this task.

When the given paths is a java.util.Map, then each output file will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be non-empty strings. The values of the map will be evaluated to individual files as per org.gradle.api.Project#file(Object).

Otherwise the given files will be evaluated as per org.gradle.api.Project#files(Object...), and task output caching will be disabled for the task.

Parameters

paths - The output files.

See Also
CacheableTask