Skip to content

Commit

Permalink
Get language version from KotlinCompilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ting-yuan committed Jun 21, 2023
1 parent bf2ebf0 commit bd4394e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,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 bd4394e

Please sign in to comment.