We learned how to use dependency configurations to group together dependencies; we saw how we must define repositories so dependencies can be resolved, but we haven't yet learned how to define the actual dependencies. We define dependencies in our build project with the dependencies{}
script block. We define a closure to pass to the dependencies{}
script block, with the configuration of the dependency.
We can define different types of dependencies. The following table shows the types we can use:
Dependency type |
Method |
Description |
---|---|---|
- |
A dependency on an external module or library in a repository. | |
|
Dependency on another Gradle project. | |
|
Dependency on a collection of files on the local computer. | |
|
A dependency on an external module where the artifacts are stored in a repository but the meta information about the module is in the... |