Thread
#multiplatform
    g

    Gunslingor

    2 years ago
    I could really use some help, I don't understand why main runtime dependency is returning a config while the test runtime dependancy is, correctly, producing a file collection..... oddly enough this task doesnt run unless the classpath is set to the test one which makes no sense!
    Kris Wong

    Kris Wong

    2 years ago
    I would suggest using code navigation to explore the plugin source
    g

    Gunslingor

    2 years ago
    Is there a way to do that in intelliJ since the plugin is just a string ?
    kotlin("multiplatform") version "1.3.70"
    Kris Wong

    Kris Wong

    2 years ago
    Cmd (Cntrl) + left click
    g

    Gunslingor

    2 years ago
    yeah, doesnt usually work on libraries defined by strings and thats what gradle uses
    I was able to go into it a bit using functions later down and learned a little, but its pretty tough to interpret
    Kris Wong

    Kris Wong

    2 years ago
    you can literally click on the property you're asking about,
    runtimeDependencyFiles
    g

    Gunslingor

    2 years ago
    yes I know, sorry... it just doesn't tell me anything. This really makes no sense why test would work but main wouldn't... almost like they are backwords
    I could zip it up and send it to you its tiny, just the beginnings of new project, trying to setup structure
    Sorry man, just been working on this rediculousness for like 19 hours my brain hurts
    Does this mean anything to you, when it should be working I'm getting this Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    Kris Wong

    Kris Wong

    2 years ago
    not to me
    g

    Gunslingor

    2 years ago
    I figured it out I guess, just by jiggling it I guess. I had tried this before but was getting error on main = ""... I changed it to setMain and it magically worked. Still though I feel like there is another way to create a task outside of the jvm() object based on the docs, but I don't really get it... that was painful, thanks for the emotional support 😃
    jvm("backend") {
        compilations {
            val main by getting
    
            val runApplication by compilations.creating {
                tasks.register<JavaExec>("runApplication") {
                    group = "fl"
                    setMain("com.company.ApplicationKt")
                    classpath = main.compileDependencyFiles + main.output.classesDirs + output.allOutputs
                }
            }
        }
    }