3
votes

My build.gradle looks like this:

plugins {
    id 'org.jetbrains.kotlin.multiplatform' version '1.3.41'
}

kotlin {

    mingwX64("mingw") {
        binaries {
            executable {
               entryPoint = 'app.AppKt'
                runTask?.args('')
            }
        }
    }

    sourceSets {
        mingwMain {
            repositories {
                mavenCentral()
            }

            dependencies {
                implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0-M1'
                implementation "no.tornado:tornadofx:1.7.19"
            }
        }
        mingwTest {
        }
    }
}

And it doesn't work. Idea says unresolved reference.

I'm was search about it in web. Some people says that TornadoFx supports Kotlin/Native.

1
Hello! I tried to do the same thing but got no issues in my IDEA project. Can you provide any additional info on your case? - Artyom Degtyarev
@ArtyomDegtyarev, Hi! thanks for comment. Can you show me your build.gradle or all project files? I will be glad of it --- I just didn’t find any samples on the internet - vffuunnyy
I'm sorry, but my previous comment might be misleading a few. I just copied your script to IDEA project, which was created by default wizard. So, I got no examples of TornadoFx actual usage. - Artyom Degtyarev
@ArtyomDegtyarev but this code doesn't work for me. strangely - vffuunnyy

1 Answers

2
votes

TornadoFX doesn't work with Kotlin/Native, because it depends upon JavaFX, which is made for JVM, so it only works in Kotlin/JVM.