I have a decently sized Gradle project that I have recently upgraded to Gradle 4.10. As part of this, I’m trying to future-proof the application by using the new dependency scopes (implementation, runtimeOnly, etc.).
I have the main application working. However, I have an integration test module that is no longer properly loading the application because its dependencies are hidden. The structure looks roughly like this:
myproj/ |- build.gradle [master build file, sets up dependency management and common config] |- myproj-app/ [Spring Boot application] | \- build.gradle [Uses 'java' plugin, declares implementation and runtimeOnly dependencies] |- myproj-lib-stuff/ [Shared application library] | \- build.gradle [Uses 'java-library' plugin, declares implementation dependencies] |- myproj-integ-test/ [Integration tests to exercise the whole application] \ \- build.gradle [Uses 'java' plugin, declares myproj-app as an integTestImplementation dependency]
I realize that the Integ Test project can’t see the transitive dependencies of the application (and its dependencies), because that’s how the
implementation configuration works. What I can’t figure out is which configuration to use that will do what I want, short of falling back to the deprecated
I’ve been fighting this for a few days now, so I thought I should ask for some guidance.