api / org.gradle.model / ModelMap / beforeEach

beforeEach

abstract fun beforeEach(configAction: Action<in T>): Unit

Applies the given action to each item in this collection, as each item is required.

The given action is invoked to configure the item when the item is required. It is called before any actions provided to #create(String, org.gradle.api.Action).

Parameters

configAction - An action that configures the item. The action is executed when the item is required.

abstract fun <S : Any> beforeEach(type: Class<S>, configAction: Action<in S>): Unit

Applies the given action to each item of the given type in this collection, as each item is required.

The given action is invoked to configure the item when the item is required. It is called before any actions provided to #create(String, org.gradle.api.Action).

Parameters

type - The type of elements to apply the action to.

configAction - An action that configures the item. The action is executed when the item is required.