gradle
8.4

# registering

fun <T : Any, C : NamedDomainObjectContainer<T>> C.registering(action: T.() -> Unit): RegisteringDomainObjectDelegateProviderWithAction<out C, T>(source)

Property delegate for registering new elements in the container.

    tasks {
       val rebuild by registering {
           dependsOn("clean", "build")
       }
    }

Content copied to clipboard

#### Parameters

T

the domain object type

C

the concrete container type

action

the configuration action

fun <T : Any, C : PolymorphicDomainObjectContainer<T>, U : T> C.registering(type: KClass<U>): RegisteringDomainObjectDelegateProviderWithType<out C, U>(source)

Property delegate for registering new elements in the container.

`tasks { val jar by registering(Jar::class) }`

#### Parameters

T

the domain object type

C

the concrete container type

type

the domain object type

fun <T : Any, C : PolymorphicDomainObjectContainer<T>, U : T> C.registering(type: KClass<U>, action: U.() -> Unit): RegisteringDomainObjectDelegateProviderWithTypeAndAction<out C, U>(source)

Property delegate for registering new elements in the container.

`tasks { val jar by registering(Jar::class) { } }`

#### Parameters

T

the container element type

C

the container type

U

the desired domain object type

type

the domain object type

action

the configuration action

val <T : Any, C : NamedDomainObjectContainer<T>> C.registering: RegisteringDomainObjectDelegateProvider<out C>(source)

Property delegate for registering new elements in the container.

`tasks { val rebuild by registering }`

#### Parameters

T

the domain object type

C

the concrete container type