diff --git a/java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin/HiltGradlePlugin.kt b/java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin/HiltGradlePlugin.kt index 34a80d1f5eb..5c6f5ee680d 100644 --- a/java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin/HiltGradlePlugin.kt +++ b/java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin/HiltGradlePlugin.kt @@ -51,6 +51,7 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.artifacts.Configuration +import org.gradle.api.artifacts.ExternalDependency import org.gradle.api.artifacts.component.ProjectComponentIdentifier import org.gradle.api.attributes.Attribute import org.gradle.api.provider.ProviderFactory @@ -421,7 +422,9 @@ class HiltGradlePlugin @Inject constructor(private val providers: ProviderFactor it.name.startsWith("hiltAnnotationProcessor") || it.name.startsWith("hiltCompileOnly") } .flatMap { configuration -> - configuration.dependencies.map { dependency -> dependency.group to dependency.name } + configuration.dependencies.filterIsInstance().map { dependency -> + dependency.group to dependency.name + } } .toSet() fun getMissingDepMsg(depCoordinate: String): String =