Interface PatternFilterable

    • Method Detail

      • getIncludes

        java.util.Set<java.lang.String> getIncludes()
        Returns the set of include patterns.
        Returns:
        The include patterns. Returns an empty set when there are no include patterns.
      • getExcludes

        java.util.Set<java.lang.String> getExcludes()
        Returns the set of exclude patterns.
        Returns:
        The exclude patterns. Returns an empty set when there are no exclude patterns.
      • setIncludes

        PatternFilterable setIncludes​(java.lang.Iterable<java.lang.String> includes)
        Set the allowable include patterns. Note that unlike include(Iterable) this replaces any previously defined includes.
        Parameters:
        includes - an Iterable providing new include patterns
        Returns:
        this
        See Also:
        Pattern Format
      • setExcludes

        PatternFilterable setExcludes​(java.lang.Iterable<java.lang.String> excludes)
        Set the allowable exclude patterns. Note that unlike exclude(Iterable) this replaces any previously defined excludes.
        Parameters:
        excludes - an Iterable providing new exclude patterns
        Returns:
        this
        See Also:
        Pattern Format
      • include

        PatternFilterable include​(java.lang.String... includes)
        Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
        Parameters:
        includes - a vararg list of include patterns
        Returns:
        this
        See Also:
        Pattern Format
      • include

        PatternFilterable include​(java.lang.Iterable<java.lang.String> includes)
        Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
        Parameters:
        includes - a Iterable providing more include patterns
        Returns:
        this
        See Also:
        Pattern Format
      • include

        PatternFilterable include​(Spec<FileTreeElement> includeSpec)
        Adds an include spec. This method may be called multiple times to append new specs. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included.
        Parameters:
        includeSpec - the spec to add
        Returns:
        this
        See Also:
        Pattern Format
      • include

        PatternFilterable include​(Closure includeSpec)
        Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed a FileTreeElement as its parameter. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included.
        Parameters:
        includeSpec - the spec to add
        Returns:
        this
        See Also:
        Pattern Format
      • exclude

        PatternFilterable exclude​(java.lang.String... excludes)
        Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
        Parameters:
        excludes - a vararg list of exclude patterns
        Returns:
        this
        See Also:
        Pattern Format
      • exclude

        PatternFilterable exclude​(java.lang.Iterable<java.lang.String> excludes)
        Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
        Parameters:
        excludes - a Iterable providing new exclude patterns
        Returns:
        this
        See Also:
        Pattern Format
      • exclude

        PatternFilterable exclude​(Spec<FileTreeElement> excludeSpec)
        Adds an exclude spec. This method may be called multiple times to append new specs. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
        Parameters:
        excludeSpec - the spec to add
        Returns:
        this
        See Also:
        Pattern Format
      • exclude

        PatternFilterable exclude​(Closure excludeSpec)
        Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed a FileTreeElement as its parameter. The closure should return true or false. Example:
         copySpec {
           from 'source'
           into 'destination'
           //an example of excluding files from certain configuration:
           exclude { it.file in configurations.someConf.files }
         }
         
        If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
        Parameters:
        excludeSpec - the spec to add
        Returns:
        this
        See Also:
        FileTreeElement