For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

Dependencies

interface Dependencies(source)

Universal APIs that are available for all dependencies blocks.

Since

7.6

See also

Inheritors

Functions

Link copied to clipboard
open fun constraint(dependencyConstraintNotation: CharSequence): DependencyConstraint
Create a DependencyConstraint from the given notation.
Create a DependencyConstraint from a project.
Create a DependencyConstraint from a minimal dependency.
Link copied to clipboard
A dependency constraint factory is used to convert supported dependency notations into DependencyConstraint instances.
Link copied to clipboard
A dependency factory is used to convert supported dependency notations into org.gradle.api.artifacts.Dependency instances.
Link copied to clipboard
@Inject
abstract fun getObjectFactory(): ObjectFactory
Injected service to create named objects.
Link copied to clipboard
@Inject
abstract fun getProject(): Project
The current project.
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.
Link copied to clipboard

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

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