@cedric: for flavours we have two styles for multi-jdk builds. One were we add directories to a prior JDK build (Java 6 = src-jdk6/ ... Java 7 = src-jdk6/ + src-jdk7/ ... Java 8 = src-jdk6/ + src-jdk7/ + src-jdk8) and we typically just use the output classpath of one as a compile dependency in the next so we don't recompile, BUT there are cases with module definition in Kotlin that you want them all to be considered a module, or you need the newer compiler for some reason (parameter names for example) so they have to be rebuilt. Other flavour is random dirs per JDK, sometimes inclusive of other builds, sometimes not. So if you do this by convention it is hard to say which pattern would be a good default, and if you had a convention at all. (src/main-jdk6 ... src/main-jdk7 ... ?)
For JavaScript before it kinda stalled, we had a bunch of JS modules, common between JS and JVM, and then JVM module. JS and JVM modules used the common module compiled two different ways.