I’m very lost. I’m trying to define a KMP module w...
# multiplatform
p
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:
Copy code
plugins {
  kotlin("multiplatform")
}
And I get this error:
Copy code
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

t
Have you tried
kotlin("multiplatform") version "1.7.10"
p
I got this error instead:
Copy code
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.
t
is this a brand new project? What version do you have of kotlin on your classpath
j
add
Copy code
kotlin {
    jvm()
}
p
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
j
but it fails on cli?
p
@Trevor Stone as in, I'm adding the version 1.7.10 of Kotlin on settings.gradle.kts. so there is no need after
d
i would create a new project|module with ide wizard. and then just copy-paste the build script and folder structure
p
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 🙈