gradle
8.3

# invoke

operator fun String.invoke(dependencyNotation: Any): Dependency?
operator fun Configuration.invoke(dependencyNotation: Any): Dependency?

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Parameters

dependencyNotation

notation for the dependency to be added.

#### See also

DependencyHandler.add

inline operator fun String.invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
inline operator fun Configuration.invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Parameters

dependencyNotation

notation for the dependency to be added.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.add

operator fun String.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency
operator fun Configuration.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Parameters

group

the group of the module to be added as a dependency.

name

the name of the module to be added as a dependency.

version

the optional version of the module to be added as a dependency.

configuration

the optional configuration of the module to be added as a dependency.

classifier

the optional classifier of the module artifact to be added as a dependency.

ext

the optional extension of the module artifact to be added as a dependency.

#### See also

DependencyHandler.add

inline operator fun String.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
inline operator fun Configuration.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Parameters

group

the group of the module to be added as a dependency.

name

the name of the module to be added as a dependency.

version

the optional version of the module to be added as a dependency.

configuration

the optional configuration of the module to be added as a dependency.

classifier

the optional classifier of the module artifact to be added as a dependency.

ext

the optional extension of the module artifact to be added as a dependency.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.create
DependencyHandler.add

inline operator fun <T : ModuleDependency> String.invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T
inline operator fun <T : ModuleDependency> Configuration.invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Parameters

dependency

dependency to be added.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.add

@Incubating
operator fun NamedDomainObjectProvider<Configuration>.invoke(dependencyNotation: Any): Dependency?

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Since

8.3

#### Parameters

dependencyNotation

notation for the dependency to be added.

#### See also

DependencyHandler.add

@Incubating
inline operator fun NamedDomainObjectProvider<Configuration>.invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Since

8.3

#### Parameters

dependencyNotation

notation for the dependency to be added.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.add

@Incubating
operator fun NamedDomainObjectProvider<Configuration>.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Since

8.3

#### Parameters

group

the group of the module to be added as a dependency.

name

the name of the module to be added as a dependency.

version

the optional version of the module to be added as a dependency.

configuration

the optional configuration of the module to be added as a dependency.

classifier

the optional classifier of the module artifact to be added as a dependency.

ext

the optional extension of the module artifact to be added as a dependency.

#### See also

DependencyHandler.add

@Incubating
inline operator fun NamedDomainObjectProvider<Configuration>.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Since

8.3

#### Parameters

group

the group of the module to be added as a dependency.

name

the name of the module to be added as a dependency.

version

the optional version of the module to be added as a dependency.

configuration

the optional configuration of the module to be added as a dependency.

classifier

the optional classifier of the module artifact to be added as a dependency.

ext

the optional extension of the module artifact to be added as a dependency.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.create
DependencyHandler.add

@Incubating
inline operator fun <T : ModuleDependency> NamedDomainObjectProvider<Configuration>.invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T

Adds a dependency to the given configuration.

#### Return

The dependency.

#### Since

8.3

#### Parameters

dependency

dependency to be added.

dependencyConfiguration

expression to use to configure the dependency.

#### See also

DependencyHandler.add

@Incubating
operator fun <T : Any> Configuration.invoke(dependency: Provider<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)
@Incubating
operator fun <T : Any> String.invoke(dependency: Provider<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)

Adds a dependency provider to the given configuration.

#### Since

7.0

#### Parameters

dependency

the dependency provider to be added.

dependencyConfiguration

the configuration to be applied to the dependency

#### See also

DependencyHandler.addProvider

@Incubating
operator fun <T : Any> NamedDomainObjectProvider<Configuration>.invoke(dependency: Provider<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)

Adds a dependency provider to the given configuration.

#### Since

8.3

#### Parameters

dependency

the dependency provider to be added.

dependencyConfiguration

the configuration to be applied to the dependency

#### See also

DependencyHandler.addProvider

operator fun <T : Any> Configuration.invoke(dependency: Provider<T>)
operator fun <T : Any> String.invoke(dependency: Provider<T>)

Adds a dependency provider to the given configuration.

#### Since

7.0

#### Parameters

dependency

the dependency provider to be added.

#### See also

DependencyHandler.addProvider

@Incubating
operator fun <T : Any> NamedDomainObjectProvider<Configuration>.invoke(dependency: Provider<T>)

Adds a dependency provider to the given configuration.

#### Since

8.3

#### Parameters

dependency

the dependency provider to be added.

#### See also

DependencyHandler.addProvider

@Incubating
operator fun <T : Any> Configuration.invoke(dependency: ProviderConvertible<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)
@Incubating
operator fun <T : Any> String.invoke(dependency: ProviderConvertible<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)

Adds a dependency provider to the given configuration.

#### Since

7.4

#### Parameters

dependency

the dependency provider to be added.

dependencyConfiguration

the configuration to be applied to the dependency

#### See also

DependencyHandler.addProviderConvertible

@Incubating
operator fun <T : Any> NamedDomainObjectProvider<Configuration>.invoke(dependency: ProviderConvertible<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)

Adds a dependency provider to the given configuration.

#### Since

8.3

#### Parameters

dependency

the dependency provider to be added.

dependencyConfiguration

the configuration to be applied to the dependency

#### See also

DependencyHandler.addProviderConvertible

operator fun <T : Any> Configuration.invoke(dependency: ProviderConvertible<T>)
operator fun <T : Any> String.invoke(dependency: ProviderConvertible<T>)

Adds a dependency provider to the given configuration.

#### Since

7.4

#### Parameters

dependency

the dependency provider to be added.

#### See also

DependencyHandler.addProviderConvertible

@Incubating
operator fun <T : Any> NamedDomainObjectProvider<Configuration>.invoke(dependency: ProviderConvertible<T>)

Adds a dependency provider to the given configuration.

#### Since

8.3

#### Parameters

dependency

the dependency provider to be added.

#### See also

DependencyHandler.addProviderConvertible

inline operator fun invoke(configuration: DependencyHandlerScope.() -> Unit)

Configures the dependencies.