ribesg
02/15/2023, 2:57 PMModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
Anyone encountered this? It's a lint task so it still builds, but it looks weird.
(see logs in thread)> Task :modules:files:lintAnalyzeDebug
e: /Users/ribesg/Projects/kommon/modules/date/build/.transforms/08dc39c7d0e8d2d4d8c22c2254b1913c/transformed/out/jars/classes.jar!/META-INF/date_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/Projects/kommon/modules/logging/log/build/.transforms/cc069f0764751b886663312279ea1e3b/transformed/out/jars/classes.jar!/META-INF/log_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/Projects/kommon/modules/parcel/build/.transforms/6655e5cdb87c32025ff3a339cf946e14/transformed/out/jars/classes.jar!/META-INF/parcel_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.10/6d5560a229477df9406943d5feda5618e98eb64c/kotlin-stdlib-1.8.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.10/6d5560a229477df9406943d5feda5618e98eb64c/kotlin-stdlib-1.8.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.10/6d5560a229477df9406943d5feda5618e98eb64c/kotlin-stdlib-1.8.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/Projects/kommon/modules/files/build/.transforms/8b50949d0fc02d8778ae67ffa6d0c0f3/transformed/out/jars/classes.jar!/META-INF/files_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/ribesg/Projects/kommon/modules/files/build/tmp/kotlin-classes/debug/META-INF/files_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
mbonnin
02/15/2023, 3:00 PMexpected version is 1.6.0
That's surprising. I would usually link to Gradle compiling with an older version of Kotlin but Gradle 8 should use Kotlin 1.8.10ribesg
02/15/2023, 3:01 PMmbonnin
02/15/2023, 3:02 PMlintAnalyzeDebug
is calling the Kotlin compiler under the hood?-i
?ribesg
02/15/2023, 3:05 PMTransforming X
lines. And this, then the errors I shared above and Build Success.
Caching disabled for task ':modules:files:lintAnalyzeDebug' because:
Build cache is disabled
Task ':modules:files:lintAnalyzeDebug' is not up-to-date because:
Task.upToDateWhen is false.
Android Lint: Reusing lint classloader 30.3.0
Android Lint: Disposing Uast application environment in lint classloader [30.3.0]
build.gradle.kts
file "fixes" it:buildscript {
dependencies.classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
}
mbonnin
02/15/2023, 3:28 PMbuildSrc
(or build-logic
) dependencies or in your root build.gradle.Kts
plugins {
id("org.jetbrains.kotlin.android").version("1.8.10")
}
Or is it somewhere else?ribesg
02/15/2023, 3:48 PMbuild.gradle.kts
I have this
dependencies {
compileOnly(gradleKotlinDsl())
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(libs.gradle.android)
implementation(libs.gradle.kotlin)
}
libs.versions.toml
which contains this
[versions]
…
android-gradle = "7.3.0"
gradle = "8.0"
kotlin = "1.8.10"
…
[libraries]
…
gradle-android = { module = "com.android.tools.build:gradle", version.ref = "android-gradle" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
…
mbonnin
02/15/2023, 3:50 PMgradleKotlinDsl()
doing funky stuff?ribesg
02/15/2023, 3:55 PM--rerun
or clean
and understood the lack of error logs as successAdam S
02/15/2023, 4:07 PMimplementation(platform(kotlin("bom")))
ribesg
02/15/2023, 4:11 PMAdam S
02/15/2023, 4:13 PMplugins {
kotlin("jvm")
}
dependencies {
implementation(platform(kotlin("bom")))
}
Note that different Configurations (implementation
, testFixturesImplementation
, androidInstrumentedTest
) might need to re-apply it.kotlin()
helper function (which automatically adds the Kotlin version)
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
mbonnin
02/15/2023, 4:15 PMAdam S
02/15/2023, 4:18 PMmbonnin
02/15/2023, 4:19 PMexpected version is 1.6.0
was coming from the compilerkotlinx.metadata
🤔Adam S
02/15/2023, 4:23 PMplatform()
. I’ve updated my examples above.mbonnin
02/15/2023, 4:29 PMkotlinx.metadata
versionribesg
02/15/2023, 4:32 PMAdam S
02/15/2023, 4:35 PM./gradlew :modules:files:dependencies
and looking for any kotlin/kotlinx dependencies that aren’t 1.8.10ribesg
02/15/2023, 5:45 PM1.7.20 -> 1.8.10
which means it's actually replaced with the updated version iircdoubov
03/15/2023, 8:56 PMribesg
03/15/2023, 8:57 PMkenkyee
03/28/2023, 8:24 PMkotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
and the jdk7/jdk8 versions of it show in the warnings too.
They're all in the gradle cache for paths.
I'm also not in a multiplatform project.Arjun Kallapur
05/11/2023, 7:25 PMe: /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-parcelize-runtime/1.8.10/b0e9f707501a1d64e47aee02bfd7d963b8448fba/kotlin-parcelize-runtime-1.8.10.jar!/META-INF/parcelize-runtime.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
doubov
05/11/2023, 7:27 PM./gradlew --version
what's your Kotlin version there?Arjun Kallapur
05/11/2023, 7:30 PMdoubov
05/11/2023, 7:35 PMArjun Kallapur
05/11/2023, 7:39 PMdoubov
05/11/2023, 7:39 PMArjun Kallapur
05/11/2023, 7:40 PM