There is no built-in support for this, at least not yet.
But you can for example register three tasks, one that creates a windows JVM image, one that creates a linux JVM image, and one that creates a mac JVM image and then configure the application distribution to include those JVM images in the distributable archive, and modify the start scripts to use these packaged JVM images, either by manipulating the generated start scripts or by using own templates for the start scripts generation task.
I got to the distribution phase and here again, it seems that the Distribution plugin does not allow inheritance.
I mean, I have the same distribution for each target os where i copy resources such as documentation
but if I create a new distribution, it does not take any configuration from the main distribution.
I thought you want one distribution with all JVM images in there.
So you want three distributions each with their own JVM image?
The contents part of a distribution is a CopySpec and you can explicitly reuse an existing copy spec.
So in Kotlin DSL it would for example be something like
I’ve done this by packing the JDK with the software and distributing as a compressed file for Mac, Linux and Windows. You can see my build file at fll-sw/build.gradle at main · jpschewe/fll-sw · GitHub
Take a look at windowsDistributionDependencies (and similar Mac and Linux ones).