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 c3612141da..3994bb4824 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 @@ -116,6 +116,7 @@ class KspGradleSubplugin @Inject internal constructor(private val registry: Tool kspTask.mapClasspath { kotlinCompileProvider.get().classpath } kspTask.options = options kspTask.outputs.dirs(kotlinOutputDir, javaOutputDir, classOutputDir) + kspTask.dependsOn(kspConfiguration.buildDependencies) }.apply { configure { kotlinCompilation.allKotlinSourceSets.forEach { sourceSet -> it.source(sourceSet.kotlin) }