Giorgi
07/16/2025, 6:26 PMsettings:
kotlin:
languageVersion: 2.2
now when I try to consume it from a Gradle project, the build failsGiorgi
07/16/2025, 6:26 PMe: file:///Users/Giorgi_Shalvashvili/Downloads/aaaaaaaaa/data/src/commonMain/kotlin/OverwatchPlayerSearchDataSource.kt:9:32 Class 'io.github.shalva97.overwatch_player_search_api.PlayerSearch' was compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler.
Giorgi
07/16/2025, 6:27 PMGiorgi
07/16/2025, 6:27 PMkotlin = "2.2.20-Beta1"
joffrey
07/16/2025, 6:48 PMlanguageVersion
set in the settings is a compiler option but doesn't change the actual Kotlin tool chain. When using a higher version than the compiler, it makes the compiler accept new experimental language constructs of future versions. This is probably why you're seeing this.joffrey
07/16/2025, 6:49 PMGiorgi
07/21/2025, 11:15 AMkotlin {
compilerOptions {
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
}
but it did not work. How to set language version? I have 2 modules, both of them have it specifiedjoffrey
07/21/2025, 11:16 AM2.1.20
as well?Giorgi
07/21/2025, 11:16 AMjoffrey
07/21/2025, 11:18 AM-Xannotation-default-target=param-property
, and then consumers gave me this errorGiorgi
07/21/2025, 11:21 AMkotlin("plugin.serialization") version "2.2.0"
Giorgi
07/21/2025, 11:21 AMkotlin("plugin.serialization") version "2.1.20"
joffrey
07/21/2025, 11:21 AMGiorgi
07/21/2025, 11:22 AM