add

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

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

Return

The dependency.

Parameters

configuration

The name of the configuration.

dependencyNotation

The dependency notation.

dependencyConfiguration

The expression to use to configure the dependency.


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

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

Return

The dependency.

Parameters

configuration

The name of the configuration.

dependency

The dependency.

dependencyConfiguration

The expression to use to configure the dependency.


inline fun <T : Any> ExtensionContainer.add(name: String, extension: T)(source)

Adds a new extension to this container.

Since

5.0

Parameters

T

the public type of the added extension

name

the name of the extension

extension

the extension instance

See also

ExtensionContainer.add

Throws

When an extension with the given name already exists.


inline fun <T : Any> CompatibilityRuleChain<T>.add(rule: KClass<out AttributeCompatibilityRule<T>>, configureAction: Action<in ActionConfiguration>)(source)
inline fun <T : Any> CompatibilityRuleChain<T>.add(rule: KClass<out AttributeCompatibilityRule<T>>, configureAction: Action<in ActionConfiguration>)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.attributes.CompatibilityRuleChain.add.

Since

4.0

See also

CompatibilityRuleChain.add

@Incubating
inline fun <T : Any> SharedModelDefaults.add(name: String, publicType: KClass<T>, configureAction: Action<in T>)(source)
@Incubating
inline fun <T : Any> SharedModelDefaults.add(name: String, publicType: KClass<T>, configureAction: Action<in T>)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.initialization.SharedModelDefaults.add.

Since

8.10

See also

SharedModelDefaults.add

inline fun <T : Any> ExtensionContainer.add(publicType: KClass<T>, name: String, extension: T)(source)
inline fun <T : Any> ExtensionContainer.add(publicType: KClass<T>, name: String, extension: T)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.add.

Since

3.5

See also

ExtensionContainer.add

inline fun <T : Any> DisambiguationRuleChain<T>.add(rule: KClass<out AttributeDisambiguationRule<T>>, configureAction: Action<in ActionConfiguration>)(source)
inline fun <T : Any> DisambiguationRuleChain<T>.add(rule: KClass<out AttributeDisambiguationRule<T>>, configureAction: Action<in ActionConfiguration>)(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.attributes.DisambiguationRuleChain.add.

Since

4.0

See also

DisambiguationRuleChain.add