Miguel Oliveira
11/13/2023, 2:04 PM1.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?tapchicoma
11/13/2023, 2:46 PMkotlin-stdlib:1.9.20
which is not compatible with Kotlin compiler 1.7.
I would advice you to configure kotlin.coreLibrariesVersion = "1.7.0"
mbonnin
11/13/2023, 2:49 PMlanguageVersion = "1.7"
/`apiVersion = "1.7"` as well?tapchicoma
11/13/2023, 2:52 PMMiguel Oliveira
11/13/2023, 2:58 PMkotlin.coreLibrariesVersion = "1.7.0"
property, and in fact I thought that declaring the languangeVersion/apiVersion would be enough.
I'm going to try it, thank you!kotlin-stdlib:1.9.20
, in the end the issue will persist, right?tapchicoma
11/13/2023, 6:58 PM