# Dependencies

interface Dependencies(source)

Universal APIs that are available for all `dependencies` blocks.

#### Since

7.6

#### See also

<a href="https://docs.gradle.org/current/userguide/implementing_gradle_plugins_binary.html#custom_dependencies_blocks">Creating custom dependencies blocks.</a>

#### Inheritors

GradleDependencies

## Functions

constraint
Link copied to clipboard
open fun constraint(dependencyConstraintNotation: CharSequence): DependencyConstraint
Create a DependencyConstraint from the given notation.
open fun constraint(project: ProjectDependency): DependencyConstraint
Create a DependencyConstraint from a project.
@Incubating
open fun constraint(dependencyConstraint: Provider<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>
@Incubating
open fun constraint(dependencyConstraint: ProviderConvertible<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>
Create a DependencyConstraint from a minimal dependency.
getDependencyConstraintFactory
Link copied to clipboard
@Inject
abstract fun getDependencyConstraintFactory(): DependencyConstraintFactory
A dependency constraint factory is used to convert supported dependency notations into DependencyConstraint instances.
getDependencyFactory
Link copied to clipboard
@Inject
abstract fun getDependencyFactory(): DependencyFactory
A dependency factory is used to convert supported dependency notations into org.gradle.api.artifacts.Dependency instances.
getObjectFactory
Link copied to clipboard
@Inject
abstract fun getObjectFactory(): ObjectFactory
Injected service to create named objects.
getProject
Link copied to clipboard
@Inject
abstract fun getProject(): Project
The current project.
module
Link copied to clipboard
open fun module(dependencyNotation: CharSequence): ExternalModuleDependency
Create an ExternalModuleDependency from the given notation.
open fun module(@Nullable group: @Nullable String, name: String, @Nullable version: @Nullable String): ExternalModuleDependency
Create an ExternalModuleDependency from a series of strings.
module
Link copied to clipboard
fun Dependencies. module(group: String?, name: String, version: String?): ExternalModuleDependency

Creates a dependency based on the group, name and version (GAV) coordinates.

project
Link copied to clipboard
open fun project(): ProjectDependency
Returns the current project as a ProjectDependency.
open fun project(projectPath: String): ProjectDependency
Converts an absolute or relative path to a project into a ProjectDependency.