Piotr Krzemiński
06/26/2025, 9:03 PMe: file:///home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/2.2.0/4258f471b10f4fce1b1c000b59495b7413e1af9a/kotlin-reflect-2.2.0.jar!/META-INF/descriptors.jvm.kotlin_module Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 2.0.0.
Do I think correctly that we need to wait for Gradle supporting metadata of at least 2.1.0?tapchicoma
06/26/2025, 9:06 PM2.2.0
in buildSrc
or wait for Gradle 9.0Piotr Krzemiński
06/26/2025, 9:29 PMWARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `2.0.21` that might work differently than in the requested version `2.2.0`.
Does it mean that as long as I don't use any features that changed their behavior across these versions, things will work fine?vladimirsitnikov
06/27/2025, 1:05 PMbuildSrc
is as follows:
1. You use kotlin("jvm") version embeddedKotlinVersion
2. dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.2.0"))
It means the compiler is the one embedded in Gradle while you supply it with a much newer libraries. That is not guaranteed to work as Kotlin does not guarantee forward compatibility.
I’m afraid there are no good solutions there.
a) You could stick with kotlin-serialization that is compatible with the minimal Gradle version you want to support. Then your plugin will
b) You could shade kotlin-* libraries so your Gradle plugin uses its own variation of kotlin-* which does not interfere with the ones Gradle provides.
Frankly shading does not sound great. Having a limit on kotlin-serialization version might be ok.vladimirsitnikov
06/27/2025, 1:06 PMForward compatibility is not guaranteed. For example, the 2.0.x compiler is not guaranteed to read binaries produced by the 2.1.x compiler
Preferably (but we can’t guarantee it), the binary format is mostly forwards compatible with the next language release
Piotr Krzemiński
06/27/2025, 1:07 PMkotlin("jvm") version "2.2.0"
(ref), I guess it's good enough for now