Hi there! I'm developing a library and recently I've upgraded: Kotlin from 1.6.10 to
1.9.20
, AGP from 7.2.1 to
7.4.2
and Gradle from 7.6.1 to
8.4
.
After publishing the library version with the updates, a client reported that he can no longer build using the library due to:
e: C:/.../.gradle/caches/transforms-3/c84840751d0bf885b57987b97ba24946/transformed/jetified-kotlin-stdlib-1.9.20.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.9.0, expected version is 1.7.1.
even after deleting all caches.
I have multiple android-only and multiplatform modules that are published, none has explicit declaration of kotlin-stdlib and I'm declaring:
Android-only modules `build.gradle`:
android {
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
languageVersion = '1.7'
apiVersion = '1.7'
jvmTarget = "1.8"
}
}
Multiplaform modules `build.gradle.kts`:
kotlin {
androidTarget {
compilations.all {
kotlinOptions {
languageVersion = "1.7"
apiVersion = "1.7"
jvmTarget = "1.8"
}
}
}
sourceSets {
all {
languageSettings {
languageVersion = "1.7"
apiVersion = "1.7"
}
}
}
}
Does any one know what could be causing this? And am I missing something to keep the library compatible with Kotlin 1.7?