For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

existing

Deprecated

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

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

tasks { val jar by existing { ... } }

Since

4.10

Parameters

action

the configuration action

Type Parameters

T

the domain object type

C

the concrete container type


Deprecated

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

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

tasks { val jar by existing(Jar::class) }

Since

4.10

Parameters

type

the domain object type

Type Parameters

T

the domain object type

C

the concrete container type


Deprecated

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

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

tasks { val jar by existing(Jar::class) { ... } }

Since

4.10

Parameters

type

the domain object type

action

the configuration action

Type Parameters

T

the domain object type

C

the concrete container type


Deprecated

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

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

tasks { val jar by existing }

Since

4.10

Type Parameters

T

the domain object type

C

the concrete container type