Skip to content

Unable to correctly link to classes in a multi module project with non-unique package names #2272

@prempalsingh

Description

@prempalsingh

Describe the bug
When using dokkaHtmlMultiModule in a multi-module project with non-unique package names (two different modules can contain the same package name), dokka incorrectly links classes in some other module.

Example -

https://img.ly/docs/vesdk/apidocs/android/v9/pesdk-backend-video-core/ly.img.android.pesdk.backend.model.state/-video-editor-save-settings/index.html

Here, VideoEditorSaveSettings (in module pesdk-backend-video-core) extends from the class SaveSettings (in module pesdk-backend-core). However, if you click on the link for SaveSettings from VideoEditorSaveSettings's documentation (link above), it redirects to https://img.ly/docs/vesdk/apidocs/android/v9/pesdk-backend-adjustment/ly.img.android.pesdk.backend.model.state/-save-settings/index.html

So, basically, it is trying to find SaveSettings in the pesdk-backend-adjustment module instead of pesdk-backend-core. I believe that this might be because the package ly.img.android.pesdk.backend.model.state exists in both pesdk-backend-adjustment and pesdk-backend-core which is somehow confusing dokka?

Expected behaviour
dokka should be correctly able to link to classes in a multi-module project with non-unique package names.

In the example above, clicking on SaveSettings should redirect to https://img.ly/docs/pesdk/apidocs/android/v9/pesdk-backend-core/ly.img.android.pesdk.backend.model.state/-save-settings/index.html

To Reproduce
Mentioned the conditions above. I can create a sample project where the issue is reproducible if needed.

Dokka configuration
Configuration of dokka used to reproduce the bug

apply plugin: 'org.jetbrains.dokka'
./gradlew dokkaHtmlMultiModule

Installation

  • Operating system: macOS/Linux
  • Build tool: Gradle v6.1.1
  • Dokka version: 1.4.30

Are you willing to provide a PR?
Yes, if someone can guide me which part of the code I should look at.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions