diff --git a/plugins/package-managers/gradle-inspector/src/main/kotlin/GradleInspector.kt b/plugins/package-managers/gradle-inspector/src/main/kotlin/GradleInspector.kt index 51704f6620ce4..f40a709636007 100644 --- a/plugins/package-managers/gradle-inspector/src/main/kotlin/GradleInspector.kt +++ b/plugins/package-managers/gradle-inspector/src/main/kotlin/GradleInspector.kt @@ -350,14 +350,11 @@ private fun Collection.toPackageRefs( packageDependencies: MutableCollection ): Set = mapTo(mutableSetOf()) { dep -> - val (id, linkage) = if (dep.localPath != null) { - val id = Identifier("Gradle", dep.groupId, dep.artifactId, dep.version) - id to PackageLinkage.PROJECT_DYNAMIC + val id = Identifier(dep.dependencyType, dep.groupId, dep.artifactId, dep.version) + val linkage = if (dep.isProjectDependency) { + PackageLinkage.PROJECT_DYNAMIC } else { - packageDependencies += dep - - val id = Identifier("Maven", dep.groupId, dep.artifactId, dep.version) - id to PackageLinkage.DYNAMIC + PackageLinkage.DYNAMIC } PackageReference(id, linkage, dep.dependencies.toPackageRefs(packageDependencies))