Skip to content

Conversation

@adam-enko
Copy link
Member

@adam-enko adam-enko commented Oct 14, 2025

When an intermediate KotlinSourceSet has no metadata compilation (e.g. webMain, mingwMain), the classpath misses the required dependencies (e.g. kotlin-stdlib, or those defined in buildscripts).

This PR updates the logic for determining the classpath. If a source set has no primary compilations, and it has no metadata compilations, then the classpath should be aggregated from the 'leaf' source sets.

Additionally, update kotlin-multiplatform-example to compile(!), and test webMain.

Workaround for:

@adam-enko adam-enko added the runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin label Oct 14, 2025
@adam-enko adam-enko changed the base branch from master to adam/support-agp-kotlin-builtin October 14, 2025 15:28
@whyoleg
Copy link
Collaborator

whyoleg commented Oct 17, 2025

JIC: my attempt to fix isMetadata failed because of an issue in AA - #4263

@adam-enko adam-enko force-pushed the adam/support-agp-kotlin-builtin branch from 12c2bb1 to 4dd9e43 Compare November 5, 2025 09:26
@adam-enko adam-enko force-pushed the adam/fix-classpath-without-metadata-compilations branch from 4cddab4 to 685f09b Compare November 6, 2025 17:03
@adam-enko adam-enko force-pushed the adam/support-agp-kotlin-builtin branch from d2b6dd7 to 747573f Compare November 10, 2025 17:38
@adam-enko adam-enko self-assigned this Nov 10, 2025
@adam-enko adam-enko force-pushed the adam/fix-classpath-without-metadata-compilations branch from 685f09b to 62d4bff Compare November 10, 2025 18:02
Workaround for intermediate source sets missing dependencies (whether stdlib or user-defined).

KT-80551
DGP can still produce output even when the code cannot be compiled.
To avoid creating invalid examples, add a test.
@adam-enko adam-enko force-pushed the adam/fix-classpath-without-metadata-compilations branch from d249aa3 to ab74561 Compare November 24, 2025 18:36
@adam-enko adam-enko changed the base branch from adam/support-agp-kotlin-builtin to master November 24, 2025 18:37
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change of this PR is in KotlinAdapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants