Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility for nested modules #11

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

IgnatBeresnev
Copy link
Contributor

Background

Ktor has many nested modules, which leads to the existence of multiple Gradle parent projects. By default, the dokkaHtmlMultiModule task is created for all parent projects.

So if there are nested modules and dokkaHtmlMultiModule is run, it means it will be executed for all parent projects, not just the root one, which in Gradle 8 leads to errors like the following:

Reason: Task ':dokkaHtmlMultiModule' uses this output of task ':sqldelight-compiler:dokkaHtmlMultiModule' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

This error could be observed after ktorio/ktor#3743 is merged.

For more details, see Kotlin/dokka#2954

Solution

Only run dokkaHtmlMultiModule for the root project by adding a semicolon in front of it. This way, it will not be called on any projects other than the root one, and so it will not lead to task dependency errors.

@e5l e5l merged commit 27bd2bd into ktorio:main Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants