https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sebastien Leclerc Lavallee

08/25/2020, 1:30 PM
Hello! When I try to build, I get this error:
Your current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.4.0 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency.
The problem is, I never updated to Kotlin 1.4. My Kotlin used for dependencies is 1.3.70. I did came across a warning yesterday that sais something like:
Common module has an external compiler that use Kotlin 1.4
Does that ring a bell to someone? The “only” thing I did was to update from gradle 5.6.X to 6.5, but I doubt it had that kind of repercussion. Thanks 🙂
m

Marc Knaup

08/25/2020, 1:32 PM
Is this a Gradle build or does the IDE build it without Gradle?
s

Sebastien Leclerc Lavallee

08/25/2020, 1:32 PM
Gradle build
m

Marc Knaup

08/25/2020, 1:33 PM
That’s weird then.
kotlin("multiplatform") version "1.3.72"
shouldn’t use a 1.4 compiler 😅
s

Sebastien Leclerc Lavallee

08/25/2020, 1:38 PM
I do not explicitly set version for multiplatform plugin because I have this error:
Plugin request for plugin already on the classpath must not include a version
And this is my root dependencies:
Copy code
dependencies {
        classpath(Deps.android_gradle_plugin)
        classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}")

        classpath(kotlin("gradle-plugin", Versions.kotlin))
        classpath(Deps.buildKonfig)

        classpath(Deps.Google.services)
    }
m

Marc Knaup

08/25/2020, 1:39 PM
Versions.kotlin
it should be then. But
Deps.buildKonfig
may upgrade it transitively to 1.4.0?
You could use a
./gradlew build --scan
to create a build scan and then explore the build dependencies on the web to see what dependency causes the upgrade to 1.4.0
s

Sebastien Leclerc Lavallee

08/25/2020, 1:40 PM
Thanks for the tip!
Versions.kotlin
point to 1.3.70 so it shouldn’t be that. But maybe
buildKonfig
Well, that
buildKonfig
was causing problem 😅 Thanks for the help!
👍 1
57 Views