gradle
8.2

# matching

abstract fun matching(@DelegatesTo(value = PatternFilterable::class) filterConfigClosure: Closure): FileTree

Restricts the contents of this tree to those files matching the given filter. The filtered tree is live, so that any changes to this tree are reflected in the filtered tree.

The given closure is used to configure the filter. A org.gradle.api.tasks.util.PatternFilterable is passed to the closure as its delegate. Only files which match the specified include patterns will be included in the filtered tree. Any files which match the specified exclude patterns will be excluded from the filtered tree.

#### Return

The filtered tree.

#### Parameters

filterConfigClosure

the closure to use to configure the filter.

abstract fun matching(filterConfigAction: Action<out Any>): FileTree

Restricts the contents of this tree to those files matching the given filter. The filtered tree is live, so that any changes to this tree are reflected in the filtered tree.

The given action is used to configure the filter. A org.gradle.api.tasks.util.PatternFilterable is passed to the action. Only files which match the specified include patterns will be included in the filtered tree. Any files which match the specified exclude patterns will be excluded from the filtered tree.

#### Return

The filtered tree.

#### Parameters

filterConfigAction

Action to use to configure the filter.

abstract fun matching(patterns: PatternFilterable): FileTree

Restricts the contents of this tree to those files matching the given filter. The filtered tree is live, so that any changes to this tree are reflected in the filtered tree.

The given pattern set is used to configure the filter. Only files which match the specified include patterns will be included in the filtered tree. Any files which match the specified exclude patterns will be excluded from the filtered tree.

#### Return

The filtered tree.

#### Parameters

patterns

the pattern set to use to configure the filter.