gradle
8.3

# whenElementFinalized

abstract fun whenElementFinalized(action: Action<out Any>)

Registers an action to execute when an element is finalized. 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 for each element when finalized.

abstract fun <S> whenElementFinalized(type: Class<S>, action: Action<out Any>)

Registers an action to execute when an element of the given type is finalized. 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 for each element when finalized.