A Gradle subproject is a buildable, testable unit within a larger build. Dependencies let one subproject use another’s classes and determine which projects Gradle recompiles and retests after a change. section 4.3 section 4.3.1
The dependency graph sets the scope of build feedback:
- Changing money triggers recompilation and tests for money and its dependents: accounting, customer-management, and order-management. section 4.3.1
- Changing customer-management affects only that project and order-management; unrelated projects are left alone. section 4.3.1
- Splitting web, persistence, and domain into separate subprojects avoids running persistence tests after a web-only change. section 4.3.3
Figure 4.9 The dependencies between Gradle projects create build-time coupling. Changing money causes the other projects to be recompiled and retested but changing customer-management only requires customer-management and order-management to be recompiled and retested.
The dependency diagram shows how a change to money reaches more projects than a change to customer-management. section 4.3.1
