Modifier and Type | Method and Description |
---|---|
void |
depend(ConfigurationName configurationName,
java.lang.String notation)
Adds a new dependency within a given configuration.
|
void |
exclude(Dependency dependency)
Excludes the given dependency from the project.
|
void |
force(Artifact artifact)
Forces all project configurations to fetch the particular dependency version.
|
void |
force(java.lang.String notation)
Forces all project configurations to fetch the particular dependency version.
|
static DependantProject |
from(org.gradle.api.Project project)
Creates a new instance of
DependantProject for the given project. |
void |
removeForcedDependency(Dependency dependency)
Removes a forced dependency from resolution strategies of all project configurations.
|
void |
removeForcedDependency(java.lang.String notation)
Removes a forced dependency from resolution strategies of all project configurations.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compile, compile, implementation
public static DependantProject from(org.gradle.api.Project project)
DependantProject
for the given project.public void depend(ConfigurationName configurationName, java.lang.String notation)
Dependant
public void exclude(Dependency dependency)
Dependant
public void force(Artifact artifact)
Dependant
public void force(java.lang.String notation)
Dependant
public void removeForcedDependency(Dependency dependency)
Dependant
removeForcedDependency
in interface Dependant
dependency
- the dependency to remove from the list of forced dependenciespublic void removeForcedDependency(java.lang.String notation)
Dependant
removeForcedDependency
in interface Dependant
notation
- the dependency spec, e.g. com.google.protobuf:protoc:3.9.0