aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-modules-page/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/all-modules-page/src/main')
-rw-r--r--plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt2
-rw-r--r--plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt10
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt b/plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt
index e6556b07..da44c840 100644
--- a/plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt
+++ b/plugins/all-modules-page/src/main/kotlin/AllModulesPagePlugin.kt
@@ -45,4 +45,4 @@ class AllModulesPagePlugin : DokkaPlugin() {
val multiModuleLinkResolver by extending {
externalModuleLinkResolver providing ::DefaultExternalModuleLinkResolver
}
-} \ No newline at end of file
+}
diff --git a/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt b/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
index 0fde629c..e7925ead 100644
--- a/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
+++ b/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
@@ -1,10 +1,10 @@
package org.jetbrains.dokka.allModulesPage
-import org.jetbrains.dokka.DokkaConfiguration
+import org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription
import org.jetbrains.dokka.base.DokkaBase
-import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProvider.Companion.identifierToFilename
import org.jetbrains.dokka.base.resolvers.shared.ExternalDocumentation
import org.jetbrains.dokka.base.resolvers.shared.PackageList
+import org.jetbrains.dokka.base.resolvers.shared.PackageList.Companion.PACKAGE_LIST_NAME
import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.plugability.DokkaContext
@@ -42,10 +42,10 @@ class DefaultExternalModuleLinkResolver(val context: DokkaContext) : ExternalMod
this
}
- private fun loadPackageListForModule(module: DokkaConfiguration.DokkaModuleDescription) =
- module.sourceOutputDirectory.resolve(File(identifierToFilename(module.name))).let {
+ private fun loadPackageListForModule(module: DokkaModuleDescription) =
+ module.sourceOutputDirectory.walkTopDown().maxDepth(3).firstOrNull { it.name == PACKAGE_LIST_NAME }?.let {
PackageList.load(
- URL("file:" + it.resolve("package-list").path),
+ URL("file:" + it.path),
8,
true
)