I’m running into trouble with Kotlin 1.4, multipla...
# multiplatform
c
I’m running into trouble with Kotlin 1.4, multiplatform, and serialization. I’m getting the warning “The Kotlin Gradle plugin was loaded multiple times in different subprojects”. It seems to be due to the fact that I have a library module that declares using the serialization plugin, and then that library module is consumed by an application module. Is there something incorrect in my setup? Library module declares:
Copy code
plugins {
    kotlin("multiplatform")
    kotlin("plugin.serialization")
}
App module, which depends on library module, declares:
Copy code
plugins {
    kotlin("multiplatform")
    id("application")
}
My settings.gradle.kts declares:
Copy code
pluginManagement {
    plugins {
        kotlin("multiplatform") version("1.4.0")
        kotlin("plugin.serialization") version("1.4.0")
    }
}
j
Kotlin serialization version is 1.0.0-rc
c
But is that true for the gradle plugin?
Where I depend on the library, I have 1.0.0-rc
j
No, gradle plugin uses kotlin I think
c
So then version should be 1.4.0, right?
j
Yep
Have you tried to remove it from settings.gradle.kts?
c
That doesn’t resolve the issue.
It seems like the issue is resolved by making sure that EVERY module declares the exact same set of Kotlin plugins.