gradle
8.5

# filter

@Incubating
abstract fun filter(spec: Spec<out Any>): Provider<T>(source)

Returns a new Provider with the value of this provider if the passed spec is satisfied and no value otherwise.

The resulting provider will be live, so that each time it is queried, it queries the original (this) provider and applies the spec to the result. Whenever the original provider has no value, the new provider will also have no value and the spec will not be called.

#### Parameters

spec

The spec to test the value.