Skip to content

Commit

Permalink
Get language version from KotlinCompilation
Browse files Browse the repository at this point in the history
(cherry picked from commit bd4394e)
  • Loading branch information
ting-yuan authored and neetopia committed Jun 22, 2023
1 parent 0f4590f commit 667d674
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 667d674

Please sign in to comment.