Why are test classes and files getting added to the omod

I’m working on a module and I have test data in the api sub project, then I also have tests in the omod sub project that need to use the test data from the api sub project so I added the test-jar dependency to the omod sub project with scope set to test as seen here and the classes/resources are visible but the problem is that the test resources and classes are getting included in the omod at the root of the archive, what am I doing wrong?

Try this change: https://github.com/dkayiwa/openmrs-module-casereport/commit/53b9e06d2b17f78f445560ed285d7a80e6d8f49d