DependencyHandlerScope

open class DependencyHandlerScope : DependencyHandlerDelegate(source)

Receiver for dependencies block providing convenient utilities for configuring dependencies.

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Functions

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?
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.

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>)
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>)
Link copied to clipboard
open override fun artifactTypes(configureAction: Action<in ArtifactTypeContainer>)
Link copied to clipboard
open override fun attributesSchema(configureAction: Action<in AttributesSchema>): AttributesSchema
Link copied to clipboard
open override fun components(configureAction: Action<in ComponentMetadataHandler>)
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.

Link copied to clipboard

Configures dependency constraint for this project.

Link copied to clipboard
open override fun create(dependencyNotation: Any): Dependency
open override fun create(dependencyNotation: Any, configureClosure: Closure<Any>): Dependency
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.

Link copied to clipboard
Link copied to clipboard

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

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
Link copied to clipboard
Link copied to clipboard
open override fun getAttributesSchema(): AttributesSchema
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getExtensions(): ExtensionContainer
Link copied to clipboard
open override fun getModules(): ComponentModuleMetadataHandler
Link copied to clipboard
open override fun gradleApi(): Dependency
Link copied to clipboard
open override fun gradleTestKit(): Dependency
Link copied to clipboard
inline operator fun invoke(configuration: DependencyHandlerScope.() -> Unit)

Configures the dependencies.

Link copied to clipboard
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.

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.

Link copied to clipboard
open override fun localGroovy(): Dependency
Link copied to clipboard
open override fun module(notation: Any): Dependency
open override fun module(notation: Any, configureClosure: Closure<Any>): Dependency
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.

Link copied to clipboard
open override fun modules(configureAction: Action<in ComponentModuleMetadataHandler>)
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
Link copied to clipboard
open override fun project(notation: Map<String, *>): Dependency
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.

Link copied to clipboard
open override fun <T : TransformParameters?> registerTransform(actionType: Class<out TransformAction<T>>, registrationAction: Action<in TransformSpec<T>>)
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.

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
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.

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>