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

add

inline fun DependencyHandler.add(configuration: String, dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

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

Parameters

configuration - The name of the configuration.

dependencyNotation - The dependency notation.

dependencyConfiguration - The expression to use to configure the dependency.

Return
The dependency.

inline fun <T : ModuleDependency> DependencyHandler.add(configuration: String, dependency: T, dependencyConfiguration: T.() -> Unit): T

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

Parameters

configuration - The name of the configuration.

dependency - The dependency.

dependencyConfiguration - The expression to use to configure the dependency.

Return
The dependency.