Skip to content

Commit

Permalink
Merge pull request #1040 from redwarp/fix/1039_fix_discrepancies_list
Browse files Browse the repository at this point in the history
Fix dependency collection to match gradle task
  • Loading branch information
mikepenz authored Nov 29, 2024
2 parents 80edf05 + be406be commit cf3e4fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,17 @@ class DependencyCollector(

else -> {
if (LOGGER.isDebugEnabled) LOGGER.debug("retrieve allModuleArtifacts from artifact")
resolvedDependency.allModuleArtifacts
val allArtifacts = resolvedDependency.allModuleArtifacts
if (includePlatform) allArtifacts + resolvedDependency.toResolvedBomArtifact()
allArtifacts
}
}
} catch (e: Throwable) {
when {
LOGGER.isDebugEnabled -> {
LOGGER.warn("Found possibly ambiguous variant - $resolvedDependency", e)
}

LOGGER.isInfoEnabled -> {
LOGGER.warn("Found possibly ambiguous variant - $resolvedDependency")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal fun <T> chooseValue(uniqueId: String, key: String, value: Array<T>?, bl
}

/**
* Convenient helper to wrap a [ResolvedDependency] into a []ResolvedArtifact]
* Convenient helper to wrap a [ResolvedDependency] into a [ResolvedArtifact]
* Required to handle `platform` dependencies.
*/
internal fun ResolvedDependency.toResolvedBomArtifact() = object : ResolvedArtifact {
Expand Down

0 comments on commit cf3e4fa

Please sign in to comment.