gradle
8.2

# named

inline fun <T : Named> ObjectFactory.named(type: KClass<T>, name: String): T

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.model.ObjectFactory.named.

#### See also

ObjectFactory.named

inline fun <S : T, T : Task> TaskCollection<T>.named(name: String, type: KClass<S>): TaskProvider<S>
inline fun <S : T, T : Task> TaskCollection<T>.named(name: String, type: KClass<S>, configurationAction: Action<in S>): TaskProvider<S>

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.tasks.TaskCollection.named.

#### See also

TaskCollection.named

inline fun <S : T, T : Any> NamedDomainObjectCollection<T>.named(name: String, type: KClass<S>): NamedDomainObjectProvider<S>
inline fun <S : T, T : Any> NamedDomainObjectCollection<T>.named(name: String, type: KClass<S>, configurationAction: Action<in S>): NamedDomainObjectProvider<S>

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.NamedDomainObjectCollection.named.

#### See also

NamedDomainObjectCollection.named

@Incubating
inline fun <T : Any> ModelMap<T>.named(name: String, ruleSource: KClass<out RuleSource>)

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

#### See also

ModelMap.named

inline fun <T : Any> NamedDomainObjectCollection<out Any>.named(name: String): NamedDomainObjectProvider<T>
fun <T : Any> NamedDomainObjectCollection<out Any>.named(name: String, type: KClass<T>): NamedDomainObjectProvider<T>

Locates an object by name and type, without triggering its creation or configuration, failing if there is no such object.

#### See also

NamedDomainObjectCollection.named

inline fun <T : Any> NamedDomainObjectCollection<out Any>.named(name: String, noinline configuration: T.() -> Unit): NamedDomainObjectProvider<T>
fun <T : Any> NamedDomainObjectCollection<out Any>.named(name: String, type: KClass<T>, configuration: T.() -> Unit): NamedDomainObjectProvider<T>

Configures an object by name and type, without triggering its creation or configuration, failing if there is no such object.

#### See also

NamedDomainObjectCollection.named
NamedDomainObjectProvider.configure

inline fun <T : Named> ObjectFactory.named(name: String): T

Creates a simple immutable Named object of the given type and name.

#### Return

the created named object

#### Parameters

T

The type of object to create

name

The name of the created object

#### See also

ObjectFactory.named

inline fun <T : Task> TaskCollection<out Task>.named(name: String): TaskProvider<T>
fun <T : Task> TaskCollection<out Task>.named(name: String, type: KClass<T>): TaskProvider<T>

Locates a task by name and type, without triggering its creation or configuration, failing if there is no such task.

#### See also

TaskCollection.named

fun <T : Task> TaskCollection<out Task>.named(name: String, type: KClass<T>, configuration: T.() -> Unit): TaskProvider<T>
inline fun <T : Task> TaskCollection<out Task>.named(name: String, noinline configuration: T.() -> Unit): TaskProvider<T>

Configures a task by name and type, without triggering its creation or configuration, failing if there is no such task.

#### See also

TaskCollection.named
TaskProvider.configure