public class DefaultTaskInputs extends Object implements TaskInputs
| Constructor and Description |
|---|
DefaultTaskInputs(FileResolver resolver,
TaskInternal task) |
| Modifier and Type | Method and Description |
|---|---|
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<String,Object> |
getProperties()
Returns the set of input properties for this task.
|
FileCollection |
getSourceFiles()
Returns the set of source files for this task.
|
TaskInputs |
properties(Map<String,?> properties)
Registers a set of input properties for this task.
|
TaskInputs |
property(String name,
Object value)
Registers an input property for this task.
|
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.
|
public DefaultTaskInputs(FileResolver resolver, TaskInternal task)
public boolean getHasInputs()
TaskInputsgetHasInputs in interface TaskInputspublic FileCollection getFiles()
TaskInputsgetFiles in interface TaskInputspublic TaskInputs files(Object... paths)
TaskInputsfiles in interface TaskInputspaths - The input files. The given paths are evaluated as for Project.files(Object...).public TaskInputs file(Object path)
TaskInputsfile in interface TaskInputspath - The input file. The given path is evaluated as for Project.files(Object...).public TaskInputs dir(Object dirPath)
TaskInputsdir in interface TaskInputsdirPath - The directory. The path is evaluated as for Project.file(Object).public boolean getHasSourceFiles()
TaskInputsgetHasSourceFiles in interface TaskInputspublic FileCollection getSourceFiles()
TaskInputsgetSourceFiles in interface TaskInputspublic TaskInputs source(Object... paths)
TaskInputsTaskInputs.files(Object...).source in interface TaskInputspaths - The paths. These are evaluated as for Project.files(Object...).public TaskInputs source(Object path)
TaskInputsTaskInputs.files(Object...).source in interface TaskInputspath - The path. This is evaluated as for Project.files(Object...).public TaskInputs sourceDir(Object path)
TaskInputsTaskInputs.dir(Object).sourceDir in interface TaskInputspath - The path. This is evaluated as for Project.file(Object).public Map<String,Object> getProperties()
TaskInputsgetProperties in interface TaskInputspublic TaskInputs property(String name, Object value)
TaskInputsRegisters 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.
property in interface TaskInputsname - The name of the property. Must not be null.value - The value for the property. Can be null.public TaskInputs properties(Map<String,?> properties)
TaskInputsTaskInputs.property(String, Object) for details.properties in interface TaskInputsproperties - The properties.Copyright © 2013. All rights reserved