Lukasz Ciastko
09/29/2023, 11:20 AMplugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
kotlin("plugin.serialization") version "1.6.10"
id("com.android.library")
id("maven-publish")
}
But now I need to make it explicit to use 1.9.10.
I tried:
plugins {
kotlin("multiplatform") version "1.9.10"
kotlin("native.cocoapods")
kotlin("plugin.serialization") version "1.6.10"
id("com.android.library")
id("maven-publish")
}
But this results in an error:
Error resolving plugin [id: 'org.jetbrains.kotlin.multiplatform', version: '1.9.10']
> Plugin request for plugin already on the classpath must not include a version
But I don’t specify the version anywhere else in my code.
How does it figure out which version it’s using and how can I know which that is and how to change it?krzysztof
09/29/2023, 11:22 AMLukasz Ciastko
09/29/2023, 11:25 AMbuildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
classpath("com.android.tools.build:gradle:7.0.4")
}
}
Would any of these dependencies have any impact on the Multiplatform version?
Sorry, I’m more of an iOS developer, not really good with Gradle.krzysztof
09/29/2023, 11:33 AMLukasz Ciastko
09/29/2023, 11:37 AMimport org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
kotlin("plugin.serialization") version "1.6.10"
id("com.android.library")
id("maven-publish")
}
krzysztof
09/29/2023, 11:38 AMLukasz Ciastko
09/29/2023, 11:38 AMplugins {
kotlin("multiplatform").version("1.9.10").apply(false)
}
I’m not sure because it complains about something else now that has changed .krzysztof
09/29/2023, 11:40 AMLukasz Ciastko
09/29/2023, 11:42 AMkrzysztof
09/29/2023, 11:43 AMbuild.gradle
you can set something like:
// <https://youtrack.jetbrains.com/issue/KTIJ-19369>
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
// other plugins here
kotlin("multiplatform").version("1.9.10").apply(false)
}
apply(false)
to stop applying plugins automatically, unless submodule apply the plugin (not every sub-module require all the plugins)My project was created around 2 years agoAh, yeah, probably best to start over and just do copy-over, if not too big effort 😄
Lukasz Ciastko
09/29/2023, 1:48 PMplugins {
kotlin("multiplatform").version("1.9.10").apply(false)
}
to the top of build.gradle.kts in the shared folder helped.
Anyway, thank you.