Thank you, that looks much nicer! However, follow-up issue: in my integration tests I don’t have access to transitive dependencies from my project. However, strangely, this isn’t an issue with the default test task.
Project :project-b has a dependency implementation project(':project-a'). A class that is declared in src/main/java of :project-a can be used from a test in src/test/java in “project-b”. However, this class is not available from within the integrationTest in src/integrationTest/java in “project-b”.
This is my test/integration test configuration:
testing {
suites {
test {
useJUnitJupiter()
}
withType(JvmTestSuite) {
dependencies {
implementation '(some library)'
}
}
integrationTest(JvmTestSuite) {
testType = TestSuiteType.INTEGRATION_TEST
dependencies {
implementation project
}
}
}
}
Where does the (implicit?) dependency for “test” come from? How can I add the same for “integrationTest”?
The implicit test dependency shows up as the first entry in “testCompileClasspath”. This entry is missing for “integrationTest”.