I have a very large multi-module project where module A’s test code depends on module B’s test code.
- B/src/test/java <== requires classes from A/src/test/java
In the past we’ve created a “test artifact” jar as shown here: How do i declare a dependency on a module's test code?
This works: testCompile project (path: ‘:A’, configuration: ‘testArtifacts’)
This fails: testImplementation project (path: ‘:A’, configuration: ‘testArtifacts’)
I don’t want to completely restructure the project using the new “fixtures”. However, I’d like to migrate to the api/implementation configurations instead of using compile/testCompile for managing dependencies.
What is the preferred way to include a module’s test classes as a dependency for another module?