Skip to content

[pull] develop from mikepenz:develop - #22

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

[pull] develop from mikepenz:develop#22
pull[bot] merged 11 commits into
wsnchristopher:developfrom
mikepenz:develop

Conversation

@pull

@pull pull Bot commented Aug 21, 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 11 commits August 21, 2026 15:33
…tion

`DuplicateMode.MERGE` grouped libraries by `groupId + name + description`,
which collapsed distinct sibling modules of the same project onto a single
entry — one of them silently disappeared from the output.

`com.materialkolor:material-kolor` and `com.materialkolor:material-color-utilities`
both publish `<name>MaterialKolor</name>` with the same description, so only one
of the two was reported (independent of `mergePlatformArtifacts`).

Sub-cluster each duplicate group by module id, so only actual platform variants
of the same module are merged (`collection` + `collection-jvm`), never sibling
modules. The surviving entry now breaks name-length ties on the shortest
uniqueId, making the root module the deterministic survivor of a KMP merge.

Fixes #1430
…dules

fix(plugin): don't merge sibling modules sharing POM name and description
…blings

`associated` is documented as "references all associated libraries", but the
filter kept only the entry equal to the library's own `uniqueId` — every linked
library ended up with a single-element list pointing at itself. The field is
serialized into `aboutlibraries.json`, so the wrong value shipped.

Also adds unit coverage for the duplicate handling that had none: `LINK`,
`KEEP`, and the `SIMPLE` / `GROUP` rules.
Clustering by "root id plus any suffix" merged a sibling module into a shorter
one it happened to share a prefix with: `androidx.core:core-ktx` collapsed into
`core`, and a `com.foo:android` module absorbed `android-core` / `android-extra`
whole.

Require the suffix to be a Kotlin target name as published (`jvm`, `android`,
`js`, `wasm-js`, `desktop`, `linuxx64`, `iossimulatorarm64`, …). An unrecognized
target degrades to reporting the artifact separately — the pre-merge output —
never to a wrong merge.
fix(plugin): `DuplicateMode.LINK` associated itself instead of its siblings
fix(plugin): only merge artifact suffixes that name a Kotlin target
…not the id

The suffix allowlist inferred the platform-variant relationship from artifact
names. Gradle already knows it exactly: `DependencyCollector.redirectTargetModule()`
reads it from `ResolvedVariantResult.getExternalVariant()`, and the result rides
along on `DependencyCoordinates.rootModule`.

Record redirects unconditionally rather than only under `mergePlatformArtifacts`,
and pass the resulting "platform artifact id -> root module id" map into
`processDuplicates`. The duplicate handling runs on the default `MERGE` whether
or not the flag is set, so the relationship has to be known in both modes; the
flag keeps deciding only whether the root coordinate also becomes the reported
`uniqueId`.

Drops the target-name regex. Any suffix a publisher invents now merges correctly,
and no sibling module can be absorbed by one it shares a prefix with.

Costs one `Optional` lookup per resolved component (~0.5µs, measured ~0.04ms per
export on a 248-component graph) — a component exposes only the variant selected
in this graph, so there is no variant list to walk. Populating `rootModule`
unconditionally changes the task's build-cache key once.
The sibling-module case was only asserted at unit level, with a hand-fed
redirect map. This exercises a real resolution of
`com.materialkolor:material-kolor:5.0.0` with `mergePlatformArtifacts` off and
the default `MERGE` / `EXACT`, which is what the report used — and what proves
the `available-at` redirects are recorded and reach the duplicate handling
regardless of the flag.
Platform artifacts are now reported under the root coordinate they redirect
from, so ids match what the build scripts declare (`androidx.collection:collection`
rather than `collection-jvm` / `collection-android`).

- `com.github.skydoves:compose-stability-runtime-*` drops out: the stability
  analyzer is no longer applied to the samples, so it is not on their classpath.
  Unrelated to the id changes — regenerating on `develop` drops it too.
- web sample loses `org.jetbrains.compose.components:components-resources-wasmJs`
  as a separate entry: it is a platform artifact of `components-resources`, which
  the previous suffix matching missed because of the camelCase `wasmJs`.

No library is lost otherwise — entry counts are unchanged for every other sample.
refactor(plugin): cluster duplicates by the `available-at` redirect, not the artifact id
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot merged commit 7d4b804 into wsnchristopher:develop Aug 21, 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