From 85a6c41f3da687ea2462dc5d34db4bd3af69e95c Mon Sep 17 00:00:00 2001 From: Benoit Vermont Date: Tue, 26 Nov 2024 10:04:42 +0100 Subject: [PATCH 1/2] Fix dependency collection to include umbrella libraries --- .../mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt index d0c985609..dfb584194 100644 --- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt +++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt @@ -126,7 +126,8 @@ class DependencyCollector( else -> { if (LOGGER.isDebugEnabled) LOGGER.debug("retrieve allModuleArtifacts from artifact") - resolvedDependency.allModuleArtifacts + resolvedDependency.allModuleArtifacts + + resolvedDependency.toResolvedBomArtifact() } } } catch (e: Throwable) { From be406be31abdb88b17bf5351bc22b34be3bcb6fc Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Fri, 29 Nov 2024 15:34:11 +0100 Subject: [PATCH 2/2] - only include the platform if `includePlatform` is enabled --- .../aboutlibraries/plugin/util/DependencyCollector.kt | 6 ++++-- .../com/mikepenz/aboutlibraries/plugin/util/Extensions.kt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt index dfb584194..cf1853f53 100644 --- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt +++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt @@ -126,8 +126,9 @@ class DependencyCollector( else -> { if (LOGGER.isDebugEnabled) LOGGER.debug("retrieve allModuleArtifacts from artifact") - resolvedDependency.allModuleArtifacts + - resolvedDependency.toResolvedBomArtifact() + val allArtifacts = resolvedDependency.allModuleArtifacts + if (includePlatform) allArtifacts + resolvedDependency.toResolvedBomArtifact() + allArtifacts } } } catch (e: Throwable) { @@ -135,6 +136,7 @@ class DependencyCollector( LOGGER.isDebugEnabled -> { LOGGER.warn("Found possibly ambiguous variant - $resolvedDependency", e) } + LOGGER.isInfoEnabled -> { LOGGER.warn("Found possibly ambiguous variant - $resolvedDependency") } diff --git a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/Extensions.kt b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/Extensions.kt index 11e624089..171986fc6 100644 --- a/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/Extensions.kt +++ b/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/Extensions.kt @@ -63,7 +63,7 @@ internal fun chooseValue(uniqueId: String, key: String, value: Array?, 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 {