# DependencyHandlerScope

open class DependencyHandlerScope : DependencyHandlerDelegate(source)

Receiver for `dependencies` block providing convenient utilities for configuring dependencies.

#### See also

DependencyHandler

## Types

Companion
Link copied to clipboard
object Companion

## Properties

delegate
Link copied to clipboard
open val delegate: DependencyHandler
dependencies
Link copied to clipboard
val dependencies: DependencyHandler
extra
Link copied to clipboard
val ExtensionAware. extra: ExtraPropertiesExtension

The extra properties extension in this object's extension container.

## Functions

add
Link copied to clipboard
open override fun add(configurationName: String, dependencyNotation: Any): Dependency?
open override fun add(configurationName: String, dependencyNotation: Any, configureClosure: Closure<Any>): Dependency?
add
Link copied to clipboard
inline fun <T : ModuleDependency> DependencyHandler. add(configuration: String, dependency: T, dependencyConfiguration: T.() -> Unit): T
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.

addProvider
Link copied to clipboard
open override fun <T> addProvider(configurationName: String, dependencyNotation: Provider<T>)
open override fun <T : Any, U : ExternalModuleDependency> addProvider(configurationName: String, dependencyNotation: Provider<T>, configuration: Action<in U>)
addProviderConvertible
Link copied to clipboard
open override fun <T> addProviderConvertible(configurationName: String, dependencyNotation: ProviderConvertible<T>)
open override fun <T : Any, U : ExternalModuleDependency> addProviderConvertible(configurationName: String, dependencyNotation: ProviderConvertible<T>, configuration: Action<in U>)
artifactTypes
Link copied to clipboard
open override fun artifactTypes(configureAction: Action<in ArtifactTypeContainer>)
attributesSchema
Link copied to clipboard
open override fun attributesSchema(configureAction: Action<in AttributesSchema>): AttributesSchema
components
Link copied to clipboard
open override fun components(configureAction: Action<in ComponentMetadataHandler>)
configure
Link copied to clipboard
inline fun <T : Any> ExtensionAware. configure(noinline configuration: T.() -> Unit)

Executes the given configuration block against the extension of the specified type.

constraints
Link copied to clipboard
fun constraints(configureAction: DependencyConstraintHandlerScope.() -> Unit)

Configures dependency constraint for this project.

create
Link copied to clipboard
open override fun create(dependencyNotation: Any): Dependency
open override fun create(dependencyNotation: Any, configureClosure: Closure<Any>): Dependency
create
Link copied to clipboard
@Incubating
inline fun DependencyHandler. create(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Creates a dependency without adding it to a configuration.

fun DependencyHandler. create(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency

Creates a dependency on a module without adding it to a configuration.

createArtifactResolutionQuery
Link copied to clipboard
open override fun createArtifactResolutionQuery(): ArtifactResolutionQuery
embeddedKotlin
Link copied to clipboard
fun DependencyHandler. embeddedKotlin(module: String): Any

Builds the dependency notation for the named Kotlin module at the embedded version (currently 2.0.21).

enforcedPlatform
Link copied to clipboard
open fun enforcedPlatform(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open override fun enforcedPlatform(notation: Any): Dependency
open override fun enforcedPlatform(dependencyProvider: Provider<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open override fun enforcedPlatform(notation: Any, configureAction: Action<in Dependency>): Dependency
getArtifactTypes
Link copied to clipboard
open override fun getArtifactTypes(): ArtifactTypeContainer
getAttributesSchema
Link copied to clipboard
open override fun getAttributesSchema(): AttributesSchema
getComponents
Link copied to clipboard
open override fun getComponents(): ComponentMetadataHandler
getConstraints
Link copied to clipboard
open override fun getConstraints(): DependencyConstraintHandler
getExtensions
Link copied to clipboard
open override fun getExtensions(): ExtensionContainer
getModules
Link copied to clipboard
open override fun getModules(): ComponentModuleMetadataHandler
gradleApi
Link copied to clipboard
open override fun gradleApi(): Dependency
gradleTestKit
Link copied to clipboard
open override fun gradleTestKit(): Dependency
invoke
Link copied to clipboard
inline operator fun invoke(configuration: DependencyHandlerScope.() -> Unit)

Configures the dependencies.

operator fun String. invoke(dependencyNotation: Any): Dependency?
@Incubating
operator fun NamedDomainObjectProvider<Configuration>.invoke(dependencyNotation: Any): Dependency?
operator fun Configuration. invoke(dependencyNotation: Any): Dependency?
inline operator fun <T : ModuleDependency> String. invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T
inline operator fun String. invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
@Incubating
inline operator fun <T : ModuleDependency> NamedDomainObjectProvider<Configuration>.invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T
@Incubating
inline operator fun NamedDomainObjectProvider<Configuration>.invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
inline operator fun <T : ModuleDependency> Configuration. invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T
inline operator fun Configuration. invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
operator fun String. invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency
@Incubating
operator fun NamedDomainObjectProvider<Configuration>.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
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
@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
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.

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

Adds a dependency provider to the given configuration.

@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependencyNotation: Any): Dependency?
@Incubating
@JvmName(name = "invokeDependencyScope")
inline operator fun <T : ModuleDependency> NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependency: T, dependencyConfiguration: T.() -> Unit): T
@Incubating
@JvmName(name = "invokeDependencyScope")
inline operator fun NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ExternalModuleDependency
@Incubating
@JvmName(name = "invokeDependencyScope")
inline operator fun NamedDomainObjectProvider<DependencyScopeConfiguration>.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 DependencyScopeConfiguration.

@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun <T : Any> NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependency: ProviderConvertible<T>)
@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun <T : Any> NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependency: Provider<T>)
@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun <T : Any> NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependency: ProviderConvertible<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)
@Incubating
@JvmName(name = "invokeDependencyScope")
operator fun <T : Any> NamedDomainObjectProvider<DependencyScopeConfiguration>.invoke(dependency: Provider<T>, dependencyConfiguration: ExternalModuleDependency.() -> Unit)

Adds a dependency provider to the given DependencyScopeConfiguration.

kotlin
Link copied to clipboard
fun DependencyHandler. kotlin(module: String, version: String? = null): Any

Builds the dependency notation for the named Kotlin module at the given version.

localGroovy
Link copied to clipboard
open override fun localGroovy(): Dependency
module
Link copied to clipboard
open override fun module(notation: Any): Dependency
open override fun module(notation: Any, configureClosure: Closure<Any>): Dependency
module
Link copied to clipboard
fun DependencyHandler. module(notation: Any, clientModuleConfiguration: ClientModuleScope.() -> Unit): ClientModule
fun DependencyHandler. module(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null): ClientModule
fun DependencyHandler. module(group: String, name: String, version: String? = null, configuration: String? = null, classifier: String? = null, ext: String? = null, clientModuleConfiguration: ClientModuleScope.() -> Unit): ClientModule

Creates a dependency on a client module without adding it to a configuration.

modules
Link copied to clipboard
open override fun modules(configureAction: Action<in ComponentModuleMetadataHandler>)
platform
Link copied to clipboard
open fun platform(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open fun platform(dependencyProvider: Provider<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open override fun platform(notation: Any): Dependency
open override fun platform(notation: Any, configureAction: Action<in Dependency>): Dependency
project
Link copied to clipboard
open override fun project(notation: Map<String, *>): Dependency
project
Link copied to clipboard
inline fun DependencyHandler. project(vararg notation: Pair<String, Any?>): Dependency

Kotlin extension function for org.gradle.api.artifacts.dsl.DependencyHandler.project.

fun DependencyHandler. project(path: String, configuration: String? = null): ProjectDependency

Creates a dependency on a project without adding it to a configuration.

registerTransform
Link copied to clipboard
open override fun <T : TransformParameters?> registerTransform(actionType: Class<out TransformAction<T>>, registrationAction: Action<in TransformSpec<T>>)
registerTransform
Link copied to clipboard
inline fun <T : TransformParameters> DependencyHandler. registerTransform(actionType: KClass<out TransformAction<T>>, registrationAction: Action<in TransformSpec<T>>)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.artifacts.dsl.DependencyHandler.registerTransform.

testFixtures
Link copied to clipboard
open fun testFixtures(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open fun testFixtures(dependencyProvider: Provider<MinimalExternalModuleDependency>): Provider<MinimalExternalModuleDependency>
open override fun testFixtures(notation: Any): Dependency
open override fun testFixtures(notation: Any, configureAction: Action<in Dependency>): Dependency
the
Link copied to clipboard
inline fun <T : Any> ExtensionAware. the(): T

Returns the extension of the specified type.

fun <T : Any> ExtensionAware. the(extensionType: KClass<T>): T

Returns the extension of the specified extensionType.

variantOf
Link copied to clipboard
open fun variantOf(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>, variantSpec: Action<in ExternalModuleDependencyVariantSpec>): Provider<MinimalExternalModuleDependency>
open override fun variantOf(dependencyProvider: Provider<MinimalExternalModuleDependency>, variantSpec: Action<in ExternalModuleDependencyVariantSpec>): Provider<MinimalExternalModuleDependency>