# creating

fun <T : Any> NamedDomainObjectContainer<T>.creating(configuration: T.() -> Unit): NamedDomainObjectContainerCreatingDelegateProvider<T>(source)

### Deprecated

Use 'val element = create(name) { }' instead. See the Gradle 9.6 upgrading guide.

Provides a property delegate that creates elements of the default collection type with the given configuration.

`val myElement by myContainer.creating { myProperty = 42 }`

#### Since

4.1

fun <T : Any, U : T> PolymorphicDomainObjectContainer<T>.creating(type: KClass<U>): PolymorphicDomainObjectContainerCreatingDelegateProvider<T, U>(source)

### Deprecated

Use 'val element = create<Type>(name)' instead. See the Gradle 9.6 upgrading guide.

Provides a property delegate that creates elements of the given type.

#### Since

4.1

fun <T : Any, U : T> PolymorphicDomainObjectContainer<T>.creating(type: KClass<U>, configuration: U.() -> Unit): PolymorphicDomainObjectContainerCreatingDelegateProvider<T, U>(source)

### Deprecated

Use 'val element = create<Type>(name) { }' instead. See the Gradle 9.6 upgrading guide.

Provides a property delegate that creates elements of the given type with the given configuration.

#### Since

4.1

fun <T : Any, U : T> PolymorphicDomainObjectContainer<T>.creating(type: Class<U>, configuration: U.() -> Unit): PolymorphicDomainObjectContainerCreatingDelegateProvider<T, U>(source)

### Deprecated

Use 'val element = create<Type>(name) { }' instead. See the Gradle 9.6 upgrading guide.

Provides a property delegate that creates elements of the given type expressed as a java.lang.Class with the given configuration.

#### Since

4.1

fun TaskContainer.creating(configuration: Task.() -> Unit): NamedDomainObjectContainerCreatingDelegateProvider<Task?>(source)

### Deprecated

Use registering instead. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more information.

#### Replace with

    registering(configuration)

Content copied to clipboard

Provides a property delegate that creates tasks of the default type with the given configuration.

`val someTask by tasks.creating { onlyIf = true }`

#### Since

8.12

fun <U : Task> TaskContainer.creating(type: KClass<U>): PolymorphicDomainObjectContainerCreatingDelegateProvider<Task?, U>(source)

### Deprecated

Use registering instead. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more information.

#### Replace with

    registering(type)

Content copied to clipboard

Provides a property delegate that creates tasks of the given type.

#### Since

8.12

fun <U : Task> TaskContainer.creating(type: KClass<U>, configuration: U.() -> Unit): PolymorphicDomainObjectContainerCreatingDelegateProvider<Task?, U>?(source)

### Deprecated

Use registering instead. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more information.

#### Replace with

    registering(type, configuration)

Content copied to clipboard

Provides a property delegate that creates tasks of the given type with the given configuration.

#### Since

8.12

fun <U : Task> TaskContainer.creating(type: Class<U>, configuration: U.() -> Unit): PolymorphicDomainObjectContainerCreatingDelegateProvider<Task?, U>?(source)

### Deprecated

Use registering instead. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more information.

#### Replace with

    registering(type, configuration)

Content copied to clipboard

Provides a property delegate that creates tasks of the given type expressed as a java.lang.Class with the given configuration.

#### Since

8.12

val <T : Any> NamedDomainObjectContainer<T>.creating: NamedDomainObjectContainerCreatingDelegateProvider<T>(source)

### Deprecated

Use 'val element = create(name)' instead. See the Gradle 9.6 upgrading guide.

Provides a property delegate that creates elements of the default collection type.

#### Since

4.1

val TaskContainer.creating: NamedDomainObjectContainerCreatingDelegateProvider<Task?>(source)

### Deprecated

Use registering instead. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more information.

#### Replace with

    registering

Content copied to clipboard

Provides a property delegate that creates tasks of the default type.

#### Since

8.12