api / org.gradle.api.artifacts.dsl / DependencyHandler / add

add

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

Adds a dependency to the given configuration.

Parameters

configurationName - The name of the configuration.

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

Return
The dependency.

abstract fun add(configurationName: String, dependencyNotation: Any, configureClosure: Closure<Any>): Dependency

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

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.

Return
The dependency.