api / org.gradle.kotlin.dsl / org.gradle.api.DomainObjectCollection

Extensions for org.gradle.api.DomainObjectCollection

withType

fun <S : Any> DomainObjectCollection<in S>.withType(configuration: S.() -> Unit): DomainObjectCollection<S>

Returns a collection containing the objects in this collection of the given type. Equivalent to calling {@code withType(type).all(configureAction)}

fun <S : Any> DomainObjectCollection<in S>.withType(): DomainObjectCollection<S>

Returns a collection containing the objects in this collection of the given type. The returned collection is live, so that when matching objects are later added to this collection, they are also visible in the filtered collection.