Skip to content

[pull] develop from mikepenz:develop - #18

Merged
pull[bot] merged 2 commits into
wsnchristopher:developfrom
mikepenz:develop
Aug 18, 2026
Merged

[pull] develop from mikepenz:develop#18
pull[bot] merged 2 commits into
wsnchristopher:developfrom
mikepenz:develop

Conversation

@pull

@pull pull Bot commented Aug 18, 2026

Copy link
Copy Markdown

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 : )

mikepenz and others added 2 commits August 17, 2026 15:37
…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
@pull pull Bot locked and limited conversation to collaborators Aug 18, 2026
@pull pull Bot added the ⤵️ pull label Aug 18, 2026
@pull
pull Bot merged commit 4f7f444 into wsnchristopher:develop Aug 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant