GradleDependencies
, JvmComponentDependencies
@Incubating public interface Dependencies
dependencies
blocks.dependencies
blocks.extension module for Groovy DSL
or
extension functions for Kotlin DSL
.Modifier and Type | Method | Description |
---|---|---|
default DependencyConstraint |
constraint(java.lang.CharSequence dependencyConstraintNotation) |
Create a
DependencyConstraint from the given notation. |
default DependencyConstraint |
constraint(ProjectDependency project) |
Create a
DependencyConstraint from a project. |
default Provider<? extends DependencyConstraint> |
constraint(Provider<? extends MinimalExternalModuleDependency> dependencyConstraint) |
Create a
DependencyConstraint from a minimal dependency. |
default Provider<? extends DependencyConstraint> |
constraint(ProviderConvertible<? extends MinimalExternalModuleDependency> dependencyConstraint) |
Create a
DependencyConstraint from a minimal dependency. |
DependencyConstraintFactory |
getDependencyConstraintFactory() |
A dependency constraint factory is used to convert supported dependency notations into
DependencyConstraint instances. |
DependencyFactory |
getDependencyFactory() |
A dependency factory is used to convert supported dependency notations into
Dependency instances. |
ObjectFactory |
getObjectFactory() |
Injected service to create named objects.
|
Project |
getProject() |
The current project.
|
default ExternalModuleDependency |
module(java.lang.CharSequence dependencyNotation) |
Create an
ExternalModuleDependency from the given notation. |
default ExternalModuleDependency |
module(java.lang.String group,
java.lang.String name,
java.lang.String version) |
Create an
ExternalModuleDependency from a series of strings. |
default ProjectDependency |
project() |
Returns the current project as a
ProjectDependency . |
default ProjectDependency |
project(java.lang.String projectPath) |
Converts an absolute or relative path to a project into a
ProjectDependency . |
@Inject DependencyFactory getDependencyFactory()
Dependency
instances.DependencyFactory
@Inject DependencyConstraintFactory getDependencyConstraintFactory()
DependencyConstraint
instances.DependencyConstraintFactory
@Inject Project getProject()
default ProjectDependency project(java.lang.String projectPath)
ProjectDependency
. Project paths are separated by colons.
This method fails if the project cannot be found.projectPath
- an absolute or relative path (from the current project) to a projectProjectDependency
for the given pathProject.project(String)
default ProjectDependency project()
ProjectDependency
.default ExternalModuleDependency module(java.lang.CharSequence dependencyNotation)
ExternalModuleDependency
from the given notation.dependencyNotation
- dependency to addValid dependency notation for this method
default ExternalModuleDependency module(@Nullable java.lang.String group, java.lang.String name, @Nullable java.lang.String version)
ExternalModuleDependency
from a series of strings.group
- the group (optional)name
- the nameversion
- the version (optional)default DependencyConstraint constraint(java.lang.CharSequence dependencyConstraintNotation)
DependencyConstraint
from the given notation.dependencyConstraintNotation
- dependency constraint to addValid dependency constraint notation for this method
default Provider<? extends DependencyConstraint> constraint(Provider<? extends MinimalExternalModuleDependency> dependencyConstraint)
DependencyConstraint
from a minimal dependency.dependencyConstraint
- dependency constraint to adddefault Provider<? extends DependencyConstraint> constraint(ProviderConvertible<? extends MinimalExternalModuleDependency> dependencyConstraint)
DependencyConstraint
from a minimal dependency.dependencyConstraint
- dependency constraint to adddefault DependencyConstraint constraint(ProjectDependency project)
DependencyConstraint
from a project.project
- the project@Inject ObjectFactory getObjectFactory()