# create

inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.create(name: String, type: KClass<U>): U(source)
inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.create(name: String, type: KClass<U>): U(source)
inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.create(name: String, type: KClass<U>, configuration: Action<in U>): U(source)
inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.create(name: String, type: KClass<U>, configuration: Action<in U>): U(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.PolymorphicDomainObjectContainer.create.

#### See also

org.gradle.api.PolymorphicDomainObjectContainer.create

@Incubating
inline fun <T : Task> BinaryTasksCollection.create(name: String, type: KClass<T>, config: Action<in T>)(source)
@Incubating
inline fun <T : Task> BinaryTasksCollection.create(name: String, type: KClass<T>, config: Action<in T>)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.platform.base.BinaryTasksCollection.create.

#### See also

org.gradle.platform.base.BinaryTasksCollection.create

inline fun <T : Any> ExtensionContainer.create(publicType: TypeOf<T>, name: String, instanceType: KClass<out T>, vararg constructionArguments: Any): T(source)
inline fun <T : Any> ExtensionContainer.create(publicType: TypeOf<T>, name: String, instanceType: KClass<out T>, vararg constructionArguments: Any): T(source)
inline fun <T : Any> ExtensionContainer.create(publicType: KClass<T>, name: String, instanceType: KClass<out T>, vararg constructionArguments: Any): T(source)
inline fun <T : Any> ExtensionContainer.create(publicType: KClass<T>, name: String, instanceType: KClass<out T>, vararg constructionArguments: Any): T(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.create.

#### Since

3.5

#### See also

org.gradle.api.plugins.ExtensionContainer.create

inline fun <T : Any> ExtensionContainer.create(name: String, type: KClass<T>, vararg constructionArguments: Any): T(source)
inline fun <T : Any> ExtensionContainer.create(name: String, type: KClass<T>, vararg constructionArguments: Any): T(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.create.

#### See also

org.gradle.api.plugins.ExtensionContainer.create

@Incubating
inline fun <S : T, T : Any> ModelMap<T>.create(name: String, type: KClass<S>)(source)
@Incubating
inline fun <S : T, T : Any> ModelMap<T>.create(name: String, type: KClass<S>)(source)
@Incubating
inline fun <S : T, T : Any> ModelMap<T>.create(name: String, type: KClass<S>, configAction: Action<in S>)(source)
@Incubating
inline fun <S : T, T : Any> ModelMap<T>.create(name: String, type: KClass<S>, configAction: Action<in S>)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.model.ModelMap.create.

#### See also

org.gradle.model.ModelMap.create

inline fun DependencyHandler.create(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency(source)

Creates a dependency without adding it to a configuration.

#### Return

The dependency.

#### Since

7.6

#### Parameters

dependencyNotation

The dependency donation.

dependencyConfiguration

The expression to use to configure the dependency.

inline fun <T : Any> ExtensionContainer.create(name: String, vararg constructionArguments: Any): T(source)

Creates and adds a new extension to this container.

#### Return

the created instance

#### Since

5.0

#### Parameters

name

the extension's name

constructionArguments

construction arguments

#### Type Parameters

T

the instance type of the new extension

#### See also

ExtensionContainer.create

inline fun <U : Any> PolymorphicDomainObjectContainer<in U>.create(name: String, noinline configuration: U.() -> Unit): U?(source)

Creates a domain object with the specified name and type, adds it to the container, and configures it with the specified action.

#### Return

the created domain object

#### Parameters

name

the name of the domain object to be created

configuration

an action for configuring the domain object

the type of the domain object to be created

#### Throws

InvalidUserDataException

if a domain object with the specified name already exists or the container does not support creating a domain object with the specified type

inline fun <U : Any> PolymorphicDomainObjectContainer<in U>.create(name: String): U?(source)

Creates a domain object with the specified name and type, and adds it to the container.

#### Return

the created domain object

#### Parameters

name

the name of the domain object to be created

the type of the domain object to be created

#### Throws

InvalidUserDataException

if a domain object with the specified name already exists or the container does not support creating a domain object with the specified type

inline fun TaskContainer.create(vararg options: Pair<String, Any>): Task(source)
inline fun TaskContainer.create(vararg options: Pair<String, Any>): Task(source)

### Deprecated

Deprecated Gradle API

Kotlin extension function for org.gradle.api.tasks.TaskContainer.create.

#### See also

org.gradle.api.tasks.TaskContainer.create

inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>): T(source)
inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>): T(source)
inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>, configuration: Action<in T>): T(source)
inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>, configuration: Action<in T>): T(source)

### Deprecated

Deprecated Gradle API

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.tasks.TaskContainer.create.

#### See also

org.gradle.api.tasks.TaskContainer.create

inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>, vararg constructorArgs: Any): T(source)
inline fun <T : Task> TaskContainer.create(name: String, type: KClass<T>, vararg constructorArgs: Any): T(source)

### Deprecated

Deprecated Gradle API

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.tasks.TaskContainer.create.

#### Since

4.7

#### See also

org.gradle.api.tasks.TaskContainer.create

fun DependencyHandler.create(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency(source)

### Deprecated

Use single-string notation instead

Creates a dependency on a module without adding it to a configuration.

#### Return

The dependency.

#### Parameters

group

the group of the module to be added as a dependency.

name

the name of the module to be added as a dependency.

version

the optional version of the module to be added as a dependency.

configuration

the optional configuration of the module to be added as a dependency.

classifier

the optional classifier of the module artifact to be added as a dependency.

ext

the optional extension of the module artifact to be added as a dependency.

#### See also

DependencyHandler.create

inline fun <T : Task> TaskContainer.create(name: String, vararg arguments: Any): T(source)

### Deprecated

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

#### Replace with

    this.register<T>(name, *arguments)

Content copied to clipboard

Creates a Task with the given name and type, passing the given arguments to the javax.inject.Inject-annotated constructor, and adds it to this project tasks container.

inline fun <T : Task> TaskContainer.create(name: String, noinline configureAction: T.() -> Unit): T(source)

### Deprecated

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

#### Replace with

    this.register<T>(name, configureAction)

Content copied to clipboard

Creates a Task with the specified name and type, adds it to the container, and configures it with the specified action.