api / org.gradle.api.tasks / CompatibilityAdapterForTaskInputs

CompatibilityAdapterForTaskInputs

interface CompatibilityAdapterForTaskInputs

Helper interface for binary compatibility with Gradle 2.x version of the TaskInputs interface.

Functions

dir

abstract fun dir(path: Any): TaskInputs

Registers an input directory hierarchy. All files found under the given directory are treated as input files for this task.

file

abstract fun file(path: Any): TaskInputs

Registers some input file for this task.

files

abstract fun files(vararg paths: Any): TaskInputs

Registers some input files for this task.

property

abstract fun property(name: String, value: Any): TaskInputs

Registers an input property for this task. This value is persisted when the task executes, and is compared against the property value for later invocations of the task, to determine if the task is up-to-date.

The given value for the property must be Serializable, so that it can be persisted. It should also provide a useful equals() method.

You can specify a closure or Callable as the value of the property. In which case, the closure or Callable is executed to determine the actual property value.

Inheritors

TaskInputs

interface TaskInputs : CompatibilityAdapterForTaskInputs

A TaskInputs represents the inputs for a task.

You can obtain a TaskInputs instance using org.gradle.api.Task#getInputs().