zyxist / chainsaw

Gradle plugin: adds support for building Java 9 modules.
Apache License 2.0
71 stars 4 forks source link

Support for multi-release JARs #3

Open zyxist opened 7 years ago

zyxist commented 7 years ago

Multi-release JARs allow packaging multiple variants of individual classes that target different JDK versions. Currently, no build system supports them, and there is no agreed convention on a directory structure layout.

A closer look at similar Maven plugins shows that they favor the following layout:

The support would have to look like this:

The open question is: what to do with unit tests?

sormuras commented 6 years ago

Hi Tomasz, who needs unit tests?!

As mr-jars are only fully supported when they are packaged (i.e. not exploded in directory tree structure) one must execute test after packaging mr-jars.

Here is an example how to organize black box unit tests after the package phase is done: https://github.com/sormuras/testing-in-the-modular-world Note that the module foo may have /src/main/java<version> folders.