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

Failed to resolve inter-module dependencies: Cannot change dependencies of dependency configuration #3068

Closed
JesusMcCloud opened this issue Jul 10, 2023 · 4 comments · Fixed by #3081
Labels

Comments

@JesusMcCloud
Copy link

JesusMcCloud commented Jul 10, 2023

Describe the bug
Dokka fails to correctly resolve task dependencies in a multi-module multiplatform project with inter-module dependencies.
This results in a build failure. Note that this is a true multiplatform project with JVM and iOS targets.

The full error message is:

Cannot change dependencies of dependency configuration ':vclib-openid:iosMainImplementationDependenciesMetadata' after task dependencies have been resolved

However, this also happens when manually invoking dokkaHtml for individual modules.

Expected behaviour
Dokka correctly resolves task dependencies of all modules and executes them as required to produce documentation.

To Reproduce

git clone --recursive -b tmp/dokkaFailKGP1.9 [email protected]:a-sit-plus/kmm-vc-library.git
./gradlew dokkaHtmlMultiModule

Dokka configuration
Note: we introduced the the inter-module Dokka-related task dependencies when upgrading to Gradle 8.1, because these dependencies were reported to be implicit and needed to be made explicit for the Dokka tasks to successfully run. The only custom configuration we really depend on is manually setting the output directory of Dokka to reference it for publishing HTML documentation on https://a-sit-plus.github.io/kmm-vc-library/.
(This is also the reason why we manually declared the publishing tasks' dependencies on the signing tasks.)

Note: Removing these manual declarations of Dokka-related task dependencies does not impact the behaviour.

I'm also satisfied with a workaround as a stop-gap solution so we can upgrade to Kotlin 1.9. Everything worked fine with KGP 1.8.20 (Except Gradle 8.1 promoting some warnings to errors compared to Gradle 7.6, requiring the previously mentioned manual specification of task dependencies.)

@JesusMcCloud JesusMcCloud changed the title Failed to resolve iner-rmodule dependencies Cannot change dependencies of dependency configuration ':<intra-project-dependency>:iosMainImplementationDependenciesMetadata' after task dependencies have been resolved Failed to resolve inter-module dependencies: Cannot change dependencies of dependency configuration Jul 10, 2023
@JesusMcCloud
Copy link
Author

Potentially related: #2679 #3063 #3059 (but again: this is a true multiplatform project targeting JVM and iOS, so I am not certain)

@JesusMcCloud
Copy link
Author

Also: yes the iOS builds fail (see https://github.com/a-sit-plus/kmm-vc-library/actions/runs/5505772958/jobs/10033568404) but this is something to be sorted out independently.

@JesusMcCloud
Copy link
Author

Thanks @whyoleg! org.jetbrains.dokka.classpath.excludePlatformDependencyFiles=true works nicely as a stop-gap solution for our project that initially triggered the issue.
(But I do understand that the underlying issue is not fixed yet)

@IgnatBeresnev
Copy link
Member

Dokka 1.9.0 has been released, and it includes some workarounds for this problem. See the following issue for details:


To avoid the spread of information and have updates in a single place, I'll close this issue and a few others as duplicates in favour of #3153.

@IgnatBeresnev IgnatBeresnev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants