api / org.gradle.language / BinaryCollection / configureEach

configureEach

abstract fun configureEach(action: Action<in T>): Unit

Registers an action to execute to configure each element in the collection. The action is only executed for those elements that are required. Fails if any element has already been finalized.

Parameters

action - The action to execute on each element for configuration.

abstract fun <S : Any> configureEach(type: Class<S>, action: Action<in S>): Unit

Registers an action to execute to configure each element of the given type in the collection. The action is only executed for those elements that are required. Fails if any matching element has already been finalized.

Parameters

type - The type of element to select.

action - The action to execute on each element for configuration.