Giorgi
03/31/2023, 11:13 AMplugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
application
}
repositories {
mavenCentral()
}
application {
mainClass.set("MainKt")
}
kotlin {
jvm {
val main by compilations.getting {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.5")
}
}
val jvmMain by getting
}
}
There is main.kt file with main() function inside commonMain source set. It also has the run button but when I try to run it this happens
Error: Could not find or load main class MainKt
Caused by: java.lang.ClassNotFoundException: MainKt
hfhbd
03/31/2023, 11:25 AMGiorgi
03/31/2023, 11:43 AMGiorgi
03/31/2023, 11:43 AMGiorgi
03/31/2023, 11:44 AMGiorgi
03/31/2023, 11:45 AMandylamax
03/31/2023, 12:47 PMapplication
plugin, doesn't know how to properly play with kotlin multiplatform pluginhfhbd
03/31/2023, 12:48 PMjvmTarget { withJava() }
Giorgi
03/31/2023, 1:19 PMGiorgi
03/31/2023, 1:19 PMGiorgi
03/31/2023, 1:23 PMhfhbd
03/31/2023, 5:01 PM