Package org.gradle.api.artifacts
Interface ProjectDependency
-
- All Superinterfaces:
Buildable
,Dependency
,HasAttributes
,HasConfigurableAttributes<ModuleDependency>
,ModuleDependency
,SelfResolvingDependency
public interface ProjectDependency extends ModuleDependency, SelfResolvingDependency
A
ProjectDependency
is aDependency
on another project in the current project hierarchy.
-
-
Field Summary
-
Fields inherited from interface org.gradle.api.artifacts.Dependency
ARCHIVES_CONFIGURATION, CLASSIFIER, DEFAULT_CONFIGURATION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ProjectDependency
copy()
Creates and returns a new dependency with the property values of this one.TaskDependency
getBuildDependencies()
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0Project
getDependencyProject()
Deprecated.This method will be removed in Gradle 9.0.java.lang.String
getPath()
Get the path to the project that this dependency refers to relative to its owning build.java.util.Set<java.io.File>
resolve()
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0java.util.Set<java.io.File>
resolve(boolean transitive)
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0-
Methods inherited from interface org.gradle.api.artifacts.Dependency
because, contentEquals, getGroup, getName, getReason, getVersion
-
Methods inherited from interface org.gradle.api.artifacts.ModuleDependency
addArtifact, artifact, artifact, attributes, capabilities, doNotEndorseStrictVersions, endorseStrictVersions, exclude, getArtifacts, getAttributes, getCapabilitySelectors, getExcludeRules, getRequestedCapabilities, getTargetConfiguration, isEndorsingStrictVersions, isTransitive, setTargetConfiguration, setTransitive
-
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
Get the path to the project that this dependency refers to relative to its owning build.- Since:
- 8.11
- See Also:
Project.getPath()
-
getDependencyProject
@Deprecated Project getDependencyProject()
Deprecated.This method will be removed in Gradle 9.0. Accessing the mutable state of other projects should be avoided.Returns the project associated with this project dependency.
-
copy
ProjectDependency copy()
Creates and returns a new dependency with the property values of this one.- Specified by:
copy
in interfaceDependency
- Specified by:
copy
in interfaceModuleDependency
- Returns:
- The copy. Never returns null.
-
getBuildDependencies
@Deprecated TaskDependency getBuildDependencies()
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0Returns a dependency which contains the tasks which build this artifact. AllBuildable
implementations must ensure that the returned dependency object is live, so that it tracks changes to the dependencies of this buildable.- Specified by:
getBuildDependencies
in interfaceBuildable
- Returns:
- The dependency. Never returns null. Returns an empty dependency when this artifact is not built by any tasks.
-
resolve
@Deprecated java.util.Set<java.io.File> resolve()
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0Resolves this dependency. AProjectDependency
is resolved with transitive equals true by this method.- Specified by:
resolve
in interfaceSelfResolvingDependency
- Returns:
- The files which make up this dependency.
- See Also:
SelfResolvingDependency.resolve(boolean)
-
resolve
@Deprecated java.util.Set<java.io.File> resolve(boolean transitive)
Deprecated.This class will no longer implementSelfResolvingDependency
in Gradle 9.0Resolves this dependency by specifying the transitive mode. This mode has only an effect if the self resolved dependency is of typeProjectDependency
. In this case, if transitive isfalse
, only the self resolving dependencies of the project configuration which are no project dependencies are resolved. If transitive is set to true, other project dependencies belonging to the configuration of the resolved project dependency are resolved recursively.- Specified by:
resolve
in interfaceSelfResolvingDependency
- Parameters:
transitive
- Whether to resolve transitively. Has only an effect on aProjectDependency
- Returns:
- The files which make up this dependency.
-
-