Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
using latest bdio and not using the builder anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kerwin committed Jun 18, 2017
1 parent 6fdc2d9 commit 1a497b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -94,7 +94,7 @@ signing {
}

dependencies {
compile 'com.blackducksoftware.integration:integration-bdio:4.0.0'
compile 'com.blackducksoftware.integration:integration-bdio:4.0.1'

compile gradleApi()
}
Expand Up @@ -9,7 +9,6 @@ import org.gradle.api.artifacts.ResolvedDependency
import org.slf4j.Logger
import org.slf4j.LoggerFactory

import com.blackducksoftware.integration.hub.bdio.simple.DependencyNodeBuilder
import com.blackducksoftware.integration.hub.bdio.simple.model.DependencyNode
import com.blackducksoftware.integration.hub.bdio.simple.model.externalid.MavenExternalId
import com.blackducksoftware.integration.util.ExcludedIncludedFilter
Expand All @@ -18,7 +17,6 @@ class DependencyGatherer {
private final Logger logger = LoggerFactory.getLogger(DependencyGatherer.class)

private Set<String> alreadyAddedIds
private DependencyNodeBuilder dependencyNodeBuilder

DependencyNode getFullyPopulatedRootNode(final Project rootProject, String excludedProjectNames, String includedProjectNames, String excludedConfigurationNames, String includedConfigurationNames) {
/**
Expand All @@ -34,7 +32,6 @@ class DependencyGatherer {
ExcludedIncludedFilter projectFilter = new ExcludedIncludedFilter(excludedProjectNames, includedProjectNames)
ExcludedIncludedFilter configurationFilter = new ExcludedIncludedFilter(excludedConfigurationNames, includedConfigurationNames)
alreadyAddedIds = new HashSet<>()
dependencyNodeBuilder = new DependencyNodeBuilder(rootProjectNode)

rootProject.allprojects.each { project ->
if (projectFilter.shouldInclude(project.name)) {
Expand Down Expand Up @@ -85,7 +82,7 @@ class DependencyGatherer {

def mavenExternalId = new MavenExternalId(group, name, version)
def dependencyNode = new DependencyNode(name, version, mavenExternalId)
dependencyNodeBuilder.addChildNodeWithParents(dependencyNode, [parentDependencyNode])
parentDependencyNode.children.add(dependencyNode)
if (alreadyAddedIds.add(mavenExternalId.createDataId())) {
for (ResolvedDependency child : resolvedDependency.getChildren()) {
addDependencyNodeToParent(dependencyNode, child)
Expand Down

0 comments on commit 1a497b4

Please sign in to comment.