is there a way to create a kotlin program without ...
# intellij
k
is there a way to create a kotlin program without specifying a main class, but rather a main function
s
since 1.3, top-level
Copy code
fun main() {
  ...
}
k
But I can't create a run configuration for this package right?
s
I think it auto-generates a transient one when you try to run from the gutter
k
it still asks for a main class, and won't just let me use a file with a main function
s
I mean, the main class is probably
FileNameKt
if I had to guess
k
(this is just the auto-generated files)
s
like, try running it by hitting the play button in the gutter (assuming it shows up) and see what IJ populates in the generated config
k
(sorry not too familiar with the JVM ecosystem nor intelliJ, what's a gutter?)
oh, the toolbar. yeah it's not enabled. I'll google around for the transient classes for package-level funcs, thanks
s
the editor gutter is the strip of UI to the right of the line numbers, you’ll see indicators for things like recursive calls, interface implementations, overrides, etc in it
k
ah okay. I figured it out, I think it's cause I generated a kotlin/native project instead of a kotlin/JVM
s
ahh, that might do it lol