named

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>(source)
fun <T : Any> NamedDomainObjectCollection<out Any>.named(name: String, type: KClass<T>, configuration: T.() -> Unit): NamedDomainObjectProvider<T>(source)

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(source)

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>(source)
fun <T : Task> TaskCollection<out Task>.named(name: String, type: KClass<T>): TaskProvider<T>(source)

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>(source)
inline fun <T : Task> TaskCollection<out Task>.named(name: String, noinline configuration: T.() -> Unit): TaskProvider<T>(source)

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

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

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

Since

4.0

See also

ObjectFactory.named

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

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

Since

5.0

See also

TaskCollection.named

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

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

Since

5.0

See also

NamedDomainObjectCollection.named

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

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

See also

ModelMap.named