gradle
8.6

# add

@Nullable
abstract fun add(configurationName: String, dependencyNotation: Any): Dependency(source)

Adds a dependency to the given configuration.

#### Return

The dependency, or null if dependencyNotation is a provider.

#### Parameters

configurationName

The name of the configuration.

dependencyNotation

The dependency notation, in one of the notations described above.

@Nullable
abstract fun add(configurationName: String, dependencyNotation: Any, configureClosure: Closure): Dependency(source)

Adds a dependency to the given configuration, and configures the dependency using the given closure.

#### Return

The dependency, or null if dependencyNotation is a provider.

#### Parameters

configurationName

The name of the configuration.

dependencyNotation

The dependency notation, in one of the notations described above.

configureClosure

The closure to use to configure the dependency.