Skip to content

Commit daa3f9d

Browse files
hfmehmedKSP Auto Pick
authored andcommitted
Replace findPlugin with withType Gradle api
(cherry picked from commit 7ca872c)
1 parent 378a29f commit daa3f9d

File tree

1 file changed

+1
-1
lines changed
  • gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/utils

1 file changed

+1
-1
lines changed

gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/utils/kgpUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal val KotlinCompilation<*>.allKotlinSourceSetsObservable
1515
internal val KotlinCompilation<*>.kotlinSourceSetsObservable
1616
get() = this.kotlinSourceSets as ObservableSet<KotlinSourceSet>
1717

18-
fun Project.isKotlinBaseApiPluginApplied() = plugins.findPlugin(KotlinBaseApiPlugin::class.java) != null
18+
fun Project.isKotlinBaseApiPluginApplied() = plugins.withType(KotlinBaseApiPlugin::class.java).firstOrNull() != null
1919

2020
fun Project.isKotlinAndroidPluginApplied() = pluginManager.hasPlugin("org.jetbrains.kotlin.android")
2121

0 commit comments

Comments
 (0)