public interface Dependant
Typically, represented by a DependencyHandler
of
the project.
Modifier and Type | Method and Description |
---|---|
default void |
compile(Artifact artifact)
Adds a new dependency within the
compile configuration. |
default void |
compile(java.lang.String notation)
Adds a new dependency within the
compile configuration. |
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.
|
default void |
implementation(java.lang.String notation)
Adds a new dependency within the
implementation configuration. |
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.
|
void depend(ConfigurationName configurationName, java.lang.String notation)
configurationName
- the name of the Gradle configurationnotation
- the dependency string, e.g. "io.spine:spine-base:1.0.0"
void exclude(Dependency dependency)
dependency
- the dependency to exclude, may refer to multiple artifacts with different versions,
classifiers, etc.void force(Artifact artifact)
artifact
- the artifact which represents a dependency resolved to the required versionvoid force(java.lang.String notation)
notation
- the dependency spec, e.g. com.google.protobuf:protoc:3.9.0
void removeForcedDependency(Dependency dependency)
dependency
- the dependency to remove from the list of forced dependenciesvoid removeForcedDependency(java.lang.String notation)
notation
- the dependency spec, e.g. com.google.protobuf:protoc:3.9.0
default void compile(Artifact artifact)
compile
configuration.compile(String)
default void compile(java.lang.String notation)
compile
configuration.
Though compile
configuration is deprecated in Gradle, it is still used in order to
define Protobuf dependencies without re-generating the Java/JS sources from the upstream
Protobuf definitions.
depend(ConfigurationName, String)
default void implementation(java.lang.String notation)
implementation
configuration.depend(ConfigurationName, String)