diff --git a/analyzer/src/main/kotlin/managers/Gradle.kt b/analyzer/src/main/kotlin/managers/Gradle.kt index 718693611517c..731c842ff7536 100644 --- a/analyzer/src/main/kotlin/managers/Gradle.kt +++ b/analyzer/src/main/kotlin/managers/Gradle.kt @@ -36,7 +36,7 @@ import org.gradle.tooling.internal.consumer.DefaultGradleConnector import org.ossreviewtoolkit.analyzer.AbstractPackageManagerFactory import org.ossreviewtoolkit.analyzer.PackageManager -import org.ossreviewtoolkit.analyzer.managers.utils.GradleDependencyGraphBuilder +import org.ossreviewtoolkit.analyzer.managers.utils.DependencyGraphBuilder import org.ossreviewtoolkit.analyzer.managers.utils.MavenSupport import org.ossreviewtoolkit.analyzer.managers.utils.identifier import org.ossreviewtoolkit.downloader.VersionControlSystem @@ -222,10 +222,11 @@ class Gradle( "The Gradle project '$projectName' uses the following Maven repositories: $repositories" } - val graphBuilder = GradleDependencyGraphBuilder(managerName, maven) + val dependencyHandler = GradleDependencyHandler(managerName, maven, repositories) + val graphBuilder = DependencyGraphBuilder(dependencyHandler) dependencyTreeModel.configurations.forEach { configuration -> configuration.dependencies.forEach { dependency -> - graphBuilder.addDependency(configuration.name, dependency, repositories) + graphBuilder.addDependency(configuration.name, dependency) } // Make sure that scopes without dependencies are recorded.