Dirk Hoffmann
05/13/2021, 12:46 PMkotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
plugins {
kotlin("multiplatform") version Deps.JetBrains.Kotlin.VERSION
id("com.github.johnrengelman.shadow") version Deps.Plugins.Shadow.VERSION
//application
}
val run by tasks.creating(JavaExec::class) {
group = group
main = theMainClass + "Kt"
kotlin {
val main = targets["jvm"].compilations["main"]
dependsOn(main.compileAllTaskName)
classpath(
{ main.output.allOutputs.files },
{ configurations["jvmRuntimeClasspath"] }
)
}
systemProperty("java.awt.headless", "true") // disable app icon on macOS
}
same for
tasks.getByName<JavaExec>("run") {
systemProperty("java.awt.headless", "true") // disable app icon on macOS
classpath(tasks.getByName<Jar>("jvmJar")) // so that the JS artifacts generated by `jvmJar` can be found and served
//classpath(project.getConfigurations().getByName("jvmRuntimeClasspath").files)
}
but now I get KotlinTarget with name 'jvm' not found.
(respectively Task with name 'jvmJar' not found in root project
)
seems there only is one 'metadata'
target ... any ideas?