I have been asking for over a year about various problems and limitations I have encountered in Gradle in regards to something I do in the Hibernate project. All of those problems/limitations are still unresolved (according to forum and Jira). So I wanted to back this up and ask how to best solve the overall thing I am trying to achieve.
Essentially it boils down to wanting to produce a “testing support” jar. In Hibernate I extend JUnit quite a bit to do some things we want/need in the test suite. All these Runners, base classes etc. are part of “testing support”. We need to use that in all the modules of our multi-module ORM build. Other Hibernate projects use it (dependency resolution) for testing. And we’d like users to be able to use it to test, report issues, etc.
I have tried a number of approaches, none of which are ideal and only one of which actually worked with Gradle. Rather than list out the things I have tried I would rather start off as a clean-room and get thoughts on what I should do.
One detail that I should mention. The “main” Hibernate ORM artifact is hibernate-core and comes from a module in this build named hibernate-core. These “testing support” classes have a dependency on the production artifact (main sourceSet) classes, and the tests in hibernate-core would have a dependency on the “testing support” classes.