Is there a way to have seperate modules: - one wit...
# multiplatform
r
Is there a way to have seperate modules: • one with kotlin/jvm • one with kotlin/multiplatform ? I tried doing it normally, but i get org.jetbrains.kotlin.gradle.plugin.ide.dependencyResolvers.IdeVisibleMultiplatformSourceDependencyResolver failed on Panel:Panel/commonMain org.jetbrains.kotlin.gradle.utils.IsolatedKotlinClasspathClassCastException: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal. Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects. If the parent project does not need the plugin, add 'apply false' to the plugin line. the root project doesn't specify any kotlin versions, but according to the notice, it wouldn't work Is there a way to get it working?
j
It is not (or it was not) an error, just a warning. The message specifies how to fix the warning/error.
r
it's an error not a warning
j
the root project doesn't specify any kotlin versions
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
r
but i got 2 different kotlin plugins
j
In the root project apply the plugin with
false
, specifying the version. In the rest of the projects just apply the plugin without the version
r
i did
Copy code
plugins {
    kotlin("jvm") version "1.9.22" apply false
    kotlin("multiplatform") version "1.9.21" apply false
}
but now compose plugin that was supposed to use kotlin multiplatform, says that i musn't use kotlin 1.9.22
j
Compose plugin does not use the Kotlin version
Ah, apply 1.9.21 version to both
Or upgrade the Compose compiler as it is already compatible with 1.9.22
r
thanks, it works now
r
cc- @Suresh Maidaragi