|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface TaskInputs
A TaskInputs represents the inputs for a task.
You can obtain a TaskInputs instance using Task.getInputs.
Method Summary | |
---|---|
TaskInputs
|
dir(Object dirPath)
Registers an input directory hierarchy. |
TaskInputs
|
file(Object path)
Registers some input file for this task. |
TaskInputs
|
files(Object... paths)
Registers some input files for this task. |
FileCollection
|
getFiles()
Returns the input files of this task. |
boolean
|
getHasInputs()
Returns true if this task has declared the inputs that it consumes. |
boolean
|
getHasSourceFiles()
Returns true if this task has declared that it accepts source files. |
Map
|
getProperties()
Returns the set of input properties for this task. |
FileCollection
|
getSourceFiles()
Returns the set of source files for this task. |
TaskInputs
|
properties(Map properties)
Registers a set of input properties for this task. |
TaskInputs
|
property(String name, Object value)
|
TaskInputs
|
source(Object... paths)
Registers some source files for this task. |
TaskInputs
|
source(Object path)
Registers some source files for this task. |
TaskInputs
|
sourceDir(Object path)
Registers a source directory for this task. |
Method Detail |
---|
public TaskInputs dir(Object dirPath)
dirPath
- The directory. The path is evaluated as per Project.file.
public TaskInputs file(Object path)
path
- The input file. The given path is evaluated as per Project.files.
public TaskInputs files(Object... paths)
paths
- The input files. The given paths are evaluated as per Project.files.
public FileCollection getFiles()
public boolean getHasInputs()
public boolean getHasSourceFiles()
public Map getProperties()
public FileCollection getSourceFiles()
public TaskInputs properties(Map properties)
properties
- The properties.
public TaskInputs property(String name, Object value)
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.
name
- The name of the property. Must not be null.value
- The value for the property. Can be null.
public TaskInputs source(Object... paths)
paths
- The paths. These are evaluated as per Project.files.
public TaskInputs source(Object path)
path
- The path. This is evaluated as per Project.files.
public TaskInputs sourceDir(Object path)
path
- The path. This is evaluated as per Project.file.
Gradle API 1.12