Open dweiss opened 2 years ago
To put tests in a different package from the code they are testing? That sounds unusual but yeah, possible. It's useful to use "package" visibility to expose methods to a a test that you would otherwise not want to expose.
Disclaimer: I'm only vaguely familiar with "split package" notions in the module system. I'd like to think tests need not adhere to this rule.
spatial-extras requires a module:
moduleApi 'org.locationtech.spatial4j:spatial4j'
and the tests of that project require this:
testImplementation 'org.locationtech.spatial4j:spatial4j::tests'
both can't live as separate public modules with the same packages - this situation is really difficult to work around in consumer projects without all sorts of command-line JVM hackery. If it's a public module meant for consumption, it should use a separate package.
It's useful to use "package" visibility to expose methods to a a test that you would otherwise not want to expose.
Yeah, this trick simply no longer works with the module system. module patching is a substitute for this, but it's hell in my opinion.
These artifacts have classes in the same package which causes major headaches if one wants to use them together with the module system. Would it be at all possible to separate packages between these two modules?