[pull] develop from mikepenz:develop - #18
Merged
Merged
Conversation
…erges Fixes #1445 (comment) With `mergePlatformArtifacts = true` a Kotlin/Native dependency lost its native `targets`, and a native-only one disappeared from the output entirely: "uniqueId": "androidx.lifecycle:lifecycle-viewmodel-savedstate", "targets": ["android", "iosSimulatorArm64"] -> "targets": ["android"] POMs are fetched through an attribute-less detached configuration (`fetchPomBatch`). A klib platform artifact cannot be selected from one: VariantSelectionByAttributesException: Cannot choose between the available variants of androidx.savedstate:savedstate-iossimulatorarm64:1.4.0 `artifactView { lenient(true) }` drops it silently, `getPomInfo` then yields no `DependencyData`, and the coordinate contributes neither metadata nor a target. That hole predates this option — it was invisible because the `available-at` root module resolves fine and stood in for its platform artifacts. Merging then traded the shell for an artifact that evaporates. The shell is now kept rather than dropped. Its coordinate already *is* the declared root id, so it deduplicates against the platform artifact by `uniqueId` instead of adding an entry, and `targets` are unioned across both. Metadata comes from the root POM, which a multiplatform publication fills in identically to its platform artifacts' — and which is the only POM that exists for native targets. No probe of the failing resolution: that would need `lenient(false)` and cost the build cache. Reproducing needs `collect.filterVariants` narrowed to the target compile classpaths. With every configuration collected the `metadata` one contributes the root coordinates directly and masks the loss, which is why the sample did not show it. Verified on a two-target consumer (`jvm` + `iosSimulatorArm64`, `filterVariants` narrowed): `androidx.collection:collection` reports both targets where it previously reported only `jvm`. On the KMP sample with the reporter's configuration: 111 libraries, 50 carrying `iosSimulatorArm64` — matching the merge-disabled baseline, now under the declared root coordinates. The sample's own output is byte-identical.
…ative-targets fix(plugin): keep the KMP root module when `mergePlatformArtifacts` merges
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )