Dependency Resolution & Caching
Understand how Gradle resolves dependencies, manages transitive dependencies, and utilizes the dependency cache.
Intro to Dependency Resolution
Welcome! In this lesson, we'll dive into how Gradle figures out which libraries your project needs and makes them available. This process is called dependency resolution.
It's crucial for any real-world project, ensuring all necessary components are in place for your code to compile and run.
Direct vs. Transitive Dependencies
When you add a library to your project, it can be either a direct dependency or a transitive dependency.
- Direct: Libraries you explicitly list in your
build.gradlefile. - Transitive: Libraries that your direct dependencies need to function. Gradle automatically fetches these for you.
All lessons in this course
- Declaring Project Dependencies
- Dependency Resolution & Caching
- Custom Repositories & BOMs
- Resolving Version Conflicts & Dependency Constraints