# ResourceFilter

interface ResourceFilter

The gradle DSL model of an Eclipse resource filter. This allows specifying a filter with a custom matcher and configuring whether it is an include/exclude filter that applies to files, folders, or both. The following example excludes the 'node_modules' folder.

    plugins {
        id 'java'
        id 'eclipse'
    }

    eclipse {
      project {
        resourceFilter {
          appliesTo = 'FOLDERS'
          type = 'EXCLUDE_ALL'
          matcher {
            id = 'org.eclipse.ui.ide.multiFilter'
            // to find out which arguments to use, configure the desired
            // filter with Eclipse's UI and copy the arguments string over
            arguments = '1.0-name-matches-false-false-node_modules'
          }
        }
      }
    }

Content copied to clipboard

#### Since

3.5

## Functions

getAppliesTo
Link copied to clipboard
abstract fun getAppliesTo(): ResourceFilterAppliesTo
Indicates whether this ResourceFilter applies to files, folders, or both.
getMatcher
Link copied to clipboard
abstract fun getMatcher(): ResourceFilterMatcher
Gets the matcher of this ResourceFilter.
getType
Link copied to clipboard
abstract fun getType(): ResourceFilterType
Specifies whether this ResourceFilter is including or excluding resources.
isRecursive
Link copied to clipboard
abstract fun isRecursive(): Boolean
Indicates whether this ResourceFilter applies recursively to all children of the project it is created on.
matcher
Link copied to clipboard
abstract fun matcher(configureAction: Action<in ResourceFilterMatcher>): ResourceFilterMatcher
Configures the matcher of this resource filter.
setAppliesTo
Link copied to clipboard
abstract fun setAppliesTo(appliesTo: ResourceFilterAppliesTo)
Indicates whether this ResourceFilter applies to files, folders, or both.
setRecursive
Link copied to clipboard
abstract fun setRecursive(recursive: Boolean)
Sets whether this ResourceFilter applies recursively or not.
setType
Link copied to clipboard
abstract fun setType(type: ResourceFilterType)
Sets the ResourceFilterType