Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependency collection to match gradle task #1040

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading