Package org.gradle.api.artifacts.dsl
Schnittstelle Dependencies
- Alle bekannten Unterschnittstellen:
GradleDependencies,JvmComponentDependencies
public interface Dependencies
Universal APIs that are available for all
dependencies blocks.- Seit:
- 7.6
- Siehe auch:
- API Note:
- This interface is intended to be used to mix-in DSL methods for
dependenciesblocks. - Implementation Requirements:
- The default implementation of all methods should not be overridden.
- Implementation Note:
- Changes to this interface may require changes to the
extension module for Groovy DSLorextension functions for Kotlin DSL.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault DependencyConstraintconstraint(CharSequence dependencyConstraintNotation) Create aDependencyConstraintfrom the given notation.default DependencyConstraintconstraint(ProjectDependency project) Create aDependencyConstraintfrom a project.default Provider<? extends DependencyConstraint> constraint(Provider<? extends MinimalExternalModuleDependency> dependencyConstraint) Create aDependencyConstraintfrom a minimal dependency.default Provider<? extends DependencyConstraint> constraint(ProviderConvertible<? extends MinimalExternalModuleDependency> dependencyConstraint) Create aDependencyConstraintfrom a minimal dependency.A dependency constraint factory is used to convert supported dependency notations intoDependencyConstraintinstances.A dependency factory is used to convert supported dependency notations intoDependencyinstances.Injected service to create named objects.The current project.default ExternalModuleDependencymodule(CharSequence dependencyNotation) Create anExternalModuleDependencyfrom the given notation.default ExternalModuleDependencyCreate anExternalModuleDependencyfrom a series of strings.default ProjectDependencyproject()Returns the current project as aProjectDependency.default ProjectDependencyConverts an absolute or relative path to a project into aProjectDependency.
-
Methodendetails
-
getDependencyFactory
A dependency factory is used to convert supported dependency notations intoDependencyinstances.- Gibt zurück:
- a dependency factory
- Siehe auch:
- Implementation Requirements:
- Do not implement this method. Gradle generates the implementation automatically.
-
getDependencyConstraintFactory
A dependency constraint factory is used to convert supported dependency notations intoDependencyConstraintinstances.- Gibt zurück:
- a dependency constraint factory
- Siehe auch:
- Implementation Requirements:
- Do not implement this method. Gradle generates the implementation automatically.
-
getProject
- Gibt zurück:
- current project
- Seit:
- 8.0
- Implementation Requirements:
- Do not implement this method. Gradle generates the implementation automatically.
-
project
Converts an absolute or relative path to a project into aProjectDependency. Project paths are separated by colons. This method fails if the project cannot be found.- Parameter:
projectPath- an absolute or relative path (from the current project) to a project- Gibt zurück:
- a
ProjectDependencyfor the given path - Siehe auch:
-
project
Returns the current project as aProjectDependency.- Gibt zurück:
- the current project as a dependency
-
module
Create anExternalModuleDependencyfrom the given notation.- Parameter:
dependencyNotation- dependency to add- Gibt zurück:
- the new dependency
- Siehe auch:
-
module
default ExternalModuleDependency module(@Nullable String group, String name, @Nullable String version) Create anExternalModuleDependencyfrom a series of strings.- Parameter:
group- the group (optional)name- the nameversion- the version (optional)- Gibt zurück:
- the new dependency
-
constraint
Create aDependencyConstraintfrom the given notation.- Parameter:
dependencyConstraintNotation- dependency constraint to add- Gibt zurück:
- the new dependency constraint
- Seit:
- 8.7
- Siehe auch:
-
constraint
@Incubating default Provider<? extends DependencyConstraint> constraint(Provider<? extends MinimalExternalModuleDependency> dependencyConstraint) Create aDependencyConstraintfrom a minimal dependency.- Parameter:
dependencyConstraint- dependency constraint to add- Gibt zurück:
- the new dependency constraint
- Seit:
- 8.7
-
constraint
@Incubating default Provider<? extends DependencyConstraint> constraint(ProviderConvertible<? extends MinimalExternalModuleDependency> dependencyConstraint) Create aDependencyConstraintfrom a minimal dependency.- Parameter:
dependencyConstraint- dependency constraint to add- Gibt zurück:
- the new dependency constraint
- Seit:
- 8.7
-
constraint
Create aDependencyConstraintfrom a project.- Parameter:
project- the project- Gibt zurück:
- the new dependency constraint
- Seit:
- 8.7
-
getObjectFactory
Injected service to create named objects.- Gibt zurück:
- injected service
- Implementation Requirements:
- Do not implement this method. Gradle generates the implementation automatically.
-