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.

add

abstract fun add(dependencyNotation: String)(source)

Add a dependency or a dependency constraint using the string notation: group:name:version.

Since

4.4

Parameters

dependencyNotation

the dependency


abstract fun add(dependencyNotation: String, configureAction: Action<in T>)(source)

Add a dependency or a dependency constraint using the string notation: group:name:version.

Since

4.4

Parameters

dependencyNotation

the dependency

configureAction

action to configure details of the dependency - see DependencyMetadata


abstract fun add(dependencyNotation: Map<String, String>)(source)

Deprecated

This method will be removed in Gradle 10. Use add instead.

Add a dependency or a dependency constraint using the map notation: group: group, name: name, version: version.

Since

4.4


abstract fun add(dependencyNotation: Map<String, String>, configureAction: Action<in T>)(source)

Deprecated

This method will be removed in Gradle 10. Use add instead.

Add a dependency or a dependency constraint using the map notation: group: group, name: name, version: version.

Since

4.4

Parameters

dependencyNotation

the dependency

configureAction

action to configure details of the dependency - see DependencyMetadata