Last active
August 5, 2020 04:14
Kotlin Multiplatform JVM workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// java.lang.ClassNotFoundException | |
// java.lang.NoClassDefFoundError | |
// Could not find or load main class | |
// https://youtrack.jetbrains.com/issue/KT-29082 | |
task execute(type: JavaExec) { | |
main = "com.github.MainKt" | |
classpath = objects.fileCollection().from( | |
tasks.named("compileKotlin"), | |
tasks.named("compileJava"), // if you have java sources or generated java sources | |
configurations.named("runtimeClasspath") | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment