that really threw me for a loop. Ok, there’s no class declared. I don’t have a library, but let’s say I have kotlin library. I can build that library as a JAR? Not sure how to add the JAR to the classpath, but let’s leave that for gradle. Now the library is a compile time dependency.
The Kotlin app still runs without a class being declared in the “main” entry point? (Not planning on using Android, just Kotlin for the JVM.)
Unless you use a @JvmStatic annotation you cannot create a static main function as required as a member of a Main class. The idiomatic way would be a free-standing function (outside of a class). The class name is just the filename with Kt appended (and extension removed). You can use an annotation to change that name though. For where to find the main function, you will have to put the right class name in your manifest the same way as in Java - it is how Java determines the main function to use.