A Gradle build project organizes source into subprojects that build and test components. Dependencies between subprojects determine which ones Gradle recompiles and retests after a change, creating build-time coupling that can delay developer feedback. section 4.3 section 4.3.1
Dependency direction determines which work a change triggers:
- Changing Money in the money project triggers tests in money and dependent projects, including accounting, customer-management, and order-management. section 4.3.1
- Changing Customer in customer-management affects customer-management and order-management, but not money or accounting. section 4.3.1
Separate unrelated implementation concerns
If order-management’s web and persistence packages share one project, changing either can trigger tests for both. Put them in separate implementation projects that depend on the domain project to avoid that unnecessary work. section 6.3.4
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.
Shows how direct and transitive project dependencies determine which projects are recompiled and retested after changes. section 4.3.1
