diff --git a/plugins/reporters/cyclonedx/src/main/kotlin/BomExtensions.kt b/plugins/reporters/cyclonedx/src/main/kotlin/BomExtensions.kt index 254b06efe5229..7c4faabb6af04 100644 --- a/plugins/reporters/cyclonedx/src/main/kotlin/BomExtensions.kt +++ b/plugins/reporters/cyclonedx/src/main/kotlin/BomExtensions.kt @@ -67,7 +67,7 @@ internal fun Bom.addExternalReference(type: ExternalReference.Type, url: String, * Add the given [ORT package][pkg] to this [Bom] by converting it to a CycloneDX [Component] using the metdata from * [input]. The [dependencyType] is added as an [ExtensibleType] to indicate "direct" vs "transitive" dependencies. */ -internal fun Bom.addPackage(input: ReporterInput, pkg: Package, dependencyType: String) { +internal fun Bom.addComponent(input: ReporterInput, pkg: Package, dependencyType: String) { val resolvedLicenseInfo = input.licenseInfoResolver.resolveLicenseInfo(pkg.id).filterExcluded() .applyChoices(input.ortResult.getPackageLicenseChoices(pkg.id)) .applyChoices(input.ortResult.getRepositoryLicenseChoices()) diff --git a/plugins/reporters/cyclonedx/src/main/kotlin/CycloneDxReporter.kt b/plugins/reporters/cyclonedx/src/main/kotlin/CycloneDxReporter.kt index 0c280794f36d1..128f429e22d10 100644 --- a/plugins/reporters/cyclonedx/src/main/kotlin/CycloneDxReporter.kt +++ b/plugins/reporters/cyclonedx/src/main/kotlin/CycloneDxReporter.kt @@ -175,7 +175,7 @@ class CycloneDxReporter( packages.forEach { (pkg, _) -> val dependencyType = if (pkg.id in allDirectDependencies) "direct" else "transitive" - bom.addPackage(input, pkg, dependencyType) + bom.addComponent(input, pkg, dependencyType) } bom.addVulnerabilities(input.ortResult.getVulnerabilities()) @@ -219,7 +219,7 @@ class CycloneDxReporter( val directDependencies = input.ortResult.dependencyNavigator.projectDependencies(project, maxDepth = 1) dependencyPackages.forEach { pkg -> val dependencyType = if (pkg.id in directDependencies) "direct" else "transitive" - bom.addPackage(input, pkg, dependencyType) + bom.addComponent(input, pkg, dependencyType) } bom.addVulnerabilities(input.ortResult.getVulnerabilities())