java-module-dependencies
java-module-dependencies copied to clipboard
Testing a multi-release JAR leads to module naming error
I have provided a reproducible sample.
I tried to test a multi-release jar (17 and 21) for behavioral consistency by applying the existing unit tests first to the java 17 sources and then to the combined java 17 + java 21 sources.
The new test suite is called test21
, which in turn creates a source set of that name. Because of this, java-module-dependencies
complains that the module name - in this case, de.chaosflaws.mrjars.test
- does not match the new source set name. (But it's the same sources - once as test
and once as test21
.)
This could be remedied if test suites could reuse existing source sets. (I opened an issue.) However, I don't expect gradle to address this soon.
Is there something that makes sense to implement here to avoid the problem I am facing?