Hildebrandt Tobias
04/17/2025, 11:38 AMplugins {
`kotlin-dsl`
}
kotlin {
jvmToolchain(21)
compilerOptions {
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
freeCompilerArgs.add("-Xcontext-receivers")
}
}
All other gradle files have nothing else declared.
Since 2025.1 I get errors in the editor related to context-receivers vs context-parameters.
Aside from rolling back the IDE, how can I change what language level / kotlin version the editor compiler uses?
When I change them in settings/build/kotlin nothing really happens, and after doing a gradle reload it's back to 2.0.21
and 2.2(latest)
.
Or does is the gradle channel a better fit for this question?
Edit: When I go back to 2024.3.5 it's at the same language version that I set in my gradle files.ephemient
04/17/2025, 1:11 PMorg.gradle.kotlin-dsl
uses org.gradle.embedded-kotlin
which is a fixed version of Kotlin for each Gradle release, as you can see at https://docs.gradle.org/current/userguide/compatibility.html#kotlinephemient
04/17/2025, 1:13 PMKotlinVersion.KOTLIN_2_*
means K2 which should hopefully be available in Gradle 9.0, https://github.com/gradle/gradle/issues/26534Hildebrandt Tobias
04/17/2025, 1:15 PMHildebrandt Tobias
05/08/2025, 10:30 AMHildebrandt Tobias
05/08/2025, 10:32 AMplugins {
`kotlin-dsl`
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
}
Hildebrandt Tobias
05/08/2025, 10:35 AMkotlin-dsl
? I tried looking it up, but I can't find anything.dmitriy.novozhilov
05/09/2025, 6:24 AMSettings -> Language & Frameworks -> Kotlin -> Enable K2 mode
dmitriy.novozhilov
05/09/2025, 6:25 AMHildebrandt Tobias
05/09/2025, 9:37 AMHildebrandt Tobias
05/12/2025, 8:00 AMdmitriy.novozhilov
05/12/2025, 8:03 AMHildebrandt Tobias
05/12/2025, 8:05 AMdmitriy.novozhilov
05/12/2025, 8:05 AMHildebrandt Tobias
05/12/2025, 8:07 AMHildebrandt Tobias
05/12/2025, 8:09 AMHildebrandt Tobias
05/12/2025, 8:11 AMcannot be called in this context with an implicit receiver. Use an explicit receiver if necessary.
dmitriy.novozhilov
05/12/2025, 8:11 AMHildebrandt Tobias
05/12/2025, 8:13 AMHildebrandt Tobias
05/12/2025, 8:16 AMHildebrandt Tobias
05/12/2025, 8:16 AMdmitriy.novozhilov
05/12/2025, 8:19 AMKT-48215
is unrelated. It's about resolution rules, so if it would be the cause then the compilation would also failHildebrandt Tobias
05/12/2025, 9:50 AM