pablisco

    pablisco

    1 month ago
    I’m very lost. I’m trying to define a KMP module with gradle and I can’t seem to be able to. 🧵
    My gradle script only has this:
    plugins {
      kotlin("multiplatform")
    }
    And I get this error:
    java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.konan.CompilerVersionImpl.<init>(java.lang.String, int, int, int, int, int, int, kotlin.jvm.internal.DefaultConstructorMarker)'
    bit of a

    head scratcher

    Trevor Stone

    Trevor Stone

    1 month ago
    Have you tried
    kotlin("multiplatform") version "1.7.10"
    pablisco

    pablisco

    1 month ago
    I got this error instead:
    Error resolving plugin [id: 'org.jetbrains.kotlin.multiplatform', version: '1.7.10']
    > The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.
    Trevor Stone

    Trevor Stone

    1 month ago
    is this a brand new project? What version do you have of kotlin on your classpath
    Javier

    Javier

    1 month ago
    add
    kotlin {
        jvm()
    }
    pablisco

    pablisco

    1 month ago
    The version is 1.7.10. Yeah, I don't have many things on it. I'll try to replicate on a separate project tonight. I tried adding the jvm() target, but doesn't even get to that point. Gradle fails while applying the kotlin multiplatform plugin for some reason
    Javier

    Javier

    1 month ago
    but it fails on cli?
    pablisco

    pablisco

    1 month ago
    @Trevor Stone as in, I'm adding the version 1.7.10 of Kotlin on settings.gradle.kts. so there is no need after
    deviant

    deviant

    1 month ago
    i would create a new project|module with ide wizard. and then just copy-paste the build script and folder structure
    pablisco

    pablisco

    1 month ago
    Yeah, gonna try that. Although, I vaguely remember not being an option to do modules on the IDE, only projects. I wonder if it can only be used as a root project (hopefully not)
    FFS, it was my own library (auto-include) that was causing the issue 🙈