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 |
|---|---|---|
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 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 methoddefault 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)@Inject ObjectFactory getObjectFactory()