I’m converting a very large maven project to Gradle.
I have 2 sub-projects:
A:B:C
and
A:G:X
Tests in A:G:X require test classes from A:B:C, how do I include them?
I already have: compile project(':A:B:C') which I can see in debug output includes the jar but, of course, the jar doesn’t contain test classes.
Not saying you’re not correct, just saying I couldn’t make it work. Would provide the link to the whole thing on Stack but I just had to delete it because they marked it as a duplicate. The other guy hadn’t even selected an answer. IMHO, those guys lack social skills.
In general, it’s a bit hacky to depend on a specific sourceSet of another subproject, don’t do that. You should define a configuration plus an artifact in :A:B:C and depend on that instead, see @Francois_Guillot’s post above.