Creating a multi-platform console application

I’m trying to figure out how to get a console application working in Kotlin multiplatform, having searched through the various tutorials/examples/documentation.

My requirements are to:

  1. support the jvm, native (windows, linux, mac), and node-js platforms.
  2. specify the main class in the jvm manifest, and the main entry point for the other targets.
  3. ideally build a fat jar file with all the dependencies in it.
  4. being able to generate installers (deb, rpm, msi, dmg, etc.) for the various platforms.

The org.jetbrains.compose plugin looks useful for (4), but AFAICT is tied to a UI (and including the compose library in your project even if you don’t use it), and looks tied to the JVM.

I’ve looked at using the application plugin, but that does not update the jvm manifest, and also seems tied to the JVM (i.e. there is a run gradle task and not a runJvm, runNode, runNative, etc. task).

Note: I would also like to copy the output into another part of the project so I can use it with a vscode extension.