diff --git a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt index 49ad5c4e54..c40c2e77be 100644 --- a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt +++ b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt @@ -403,7 +403,7 @@ class KspGradleSubplugin @Inject internal constructor(private val registry: Tool fun configureLanguageVersion(kspTask: KotlinCompilationTask<*>) { kspTask.compilerOptions.useK2.value(false) - kspTask.compilerOptions.languageVersion.orNull?.let { version -> + kotlinCompilation.compilerOptions.options.languageVersion.orNull?.let { version -> if (version >= KotlinVersion.KOTLIN_2_0) { kspTask.compilerOptions.languageVersion.value(LANGUAGE_VERSION) }