Tianyu Zhu
03/21/2023, 7:56 PMbuild.gradle.kts
plugins {
kotlin("multiplatform")
application
}
application {
mainClass.set("path.to.my.MainKt")
}
kotlin {
js()
jvm()
}
I'd like to use gradlew run
to run the path.to.my.MainKt
file, but the run
task doesn't want to use the runtime classpath in jvmMain
. How do I fix this problem?ephemient
03/21/2023, 8:49 PMapplication
with Kotllin multiplatform without withJava()
ephemient
03/21/2023, 8:51 PMkotlin { jvm { withJava() } }
then the application
plugin should work, but you can't add Android platform (because it conflicts with Java)ephemient
03/21/2023, 8:54 PMapplication
plugin, as I did in https://youtrack.jetbrains.com/issue/KT-50227Tianyu Zhu
03/21/2023, 10:07 PM