I have a legacy application that has a unit test module that's separate from the application modules. I'm converting the project to use Gradle and the structure looks like this:
/root
/module1
/module2
...
/moduleN
/test
where the test module executes tests for module1 through moduleN (and depends on them). I know this isn't a very good practice as it kinda defeats the purpose of unit tests but as all know, legacy code is always a headache to work with.
So before I start refactoring the code so that each module has its own unit tests (which means disassembling the test module in a sensible way, i.e., a lot of work) I wanted to find a temporary solution to get the correct code coverage, i.e., have JaCoCo instrument all the classes from module1, ..., moduleN instead of just module test.
Is there a way to tell JaCoCo to instrument classes from other modules?