docs.gradle.org

    • Method Detail

      • withPropertyName

        TaskInputFilePropertyBuilder withPropertyName(String propertyName)

        Sets the name for this property. The name must be a valid Java identifier, or a series of valid Java identifiers separated with dots ('.').

        If the method is not called, or if it is called with null, a name will be assigned to the property automatically.

        Specified by:
        withPropertyName in interface TaskPropertyBuilder
      • skipWhenEmpty

        TaskInputFilePropertyBuilder skipWhenEmpty()

        Skip executing the task if the property contains no files. If there are multiple properties with {code skipWhenEmpty = true}, then they all need to be empty for the task to be skipped.

      • skipWhenEmpty

        TaskInputFilePropertyBuilder skipWhenEmpty(boolean skipWhenEmpty)

        Sets whether executing the task should be skipped if the property contains no files. If there are multiple properties with {code skipWhenEmpty = true}, then they all need to be empty for the task to be skipped.

      • optional

        TaskInputFilePropertyBuilder optional()

        Marks a task property as optional. This means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property.

      • optional

        TaskInputFilePropertyBuilder optional(boolean optional)

        Sets whether the task property is optional. If the task property is optional, it means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property.

      • orderSensitive

        @Deprecated
        TaskInputFilePropertyBuilder orderSensitive()

        Deprecated. This method will be removed in Gradle 4.0 without replacement.

        Sets the order of the files to be relevant when observing this property.

        Since:
        3.1
      • orderSensitive

        @Deprecated
        TaskInputFilePropertyBuilder orderSensitive(boolean orderSensitive)

        Deprecated. This method will be removed in Gradle 4.0 without replacement.

        Sets whether the order of the files is relevant when observing this property.

        Since:
        3.1
      • getHasInputs

        @Deprecated
        boolean getHasInputs()

        Returns true if this task has declared the inputs that it consumes.

        Specified by:
        getHasInputs in interface TaskInputs
        Returns:
        true if this task has declared any inputs.
      • getFiles

        @Deprecated
        FileCollection getFiles()

        Returns the input files of this task.

        Specified by:
        getFiles in interface TaskInputs
        Returns:
        The input files. Returns an empty collection if this task has no input files.
      • property

        @Deprecated
        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.

        Specified by:
        property in interface TaskInputs
        Parameters:
        name - The name of the property. Must not be null.
        value - The value for the property. Can be null.
      • getHasSourceFiles

        @Deprecated
        boolean getHasSourceFiles()

        Returns true if this task has declared that it accepts source files.

        Specified by:
        getHasSourceFiles in interface TaskInputs
        Returns:
        true if this task has source files, false if not.
      • getSourceFiles

        @Deprecated
        FileCollection getSourceFiles()

        Returns the set of source files for this task. These are the subset of input files which the task actually does work on. A task is skipped if it has declared it accepts source files, and this collection is empty.

        Specified by:
        getSourceFiles in interface TaskInputs
        Returns:
        The set of source files for this task.

Read the original on docs.gradle.org ↗