aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt2
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt2
-rw-r--r--plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt2
-rw-r--r--plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt2
-rw-r--r--plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt2
5 files changed, 5 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index 09d6cad1..4313f1e3 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -104,7 +104,7 @@ abstract class DefaultRenderer<T>(
is ContentHeader -> buildHeader(node, pageContext, sourceSetRestriction)
is ContentCode -> buildCode(node, pageContext)
is ContentDRILink ->
- buildLink(locationProvider.resolve(node.address, node.sourceSets.toList(), pageContext)) {
+ buildLink(locationProvider.resolve(node.address, node.sourceSets, pageContext)) {
buildLinkText(node.children, pageContext, sourceSetRestriction)
}
is ContentResolvedLink -> buildLink(node.address) {
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index d56ab50c..de892bb1 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -526,7 +526,7 @@ open class HtmlRenderer(
platforms: List<DokkaSourceSet>,
from: PageNode? = null,
block: FlowContent.() -> Unit
- ) = buildLink(locationProvider.resolve(to, platforms, from), block)
+ ) = buildLink(locationProvider.resolve(to, platforms.toSet(), from), block)
override fun buildError(node: ContentNode) {
context.logger.error("Unknown ContentNode type: $node")
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
index 4d44fdef..6c4869d8 100644
--- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
+++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
@@ -46,7 +46,7 @@ open class DefaultLocationProvider(
override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean): String =
pathTo(node, context) + if (!skipExtension) extension else ""
- override fun resolve(dri: DRI, sourceSets: List<DokkaSourceSet>, context: PageNode?): String =
+ override fun resolve(dri: DRI, sourceSets: Set<DokkaSourceSet>, context: PageNode?): String =
pagesIndex[dri]?.let { resolve(it, context) } ?:
// Not found in PageGraph, that means it's an external link
getLocation(
diff --git a/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt
index d6d616f3..745636d0 100644
--- a/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt
+++ b/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt
@@ -6,7 +6,7 @@ import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
interface LocationProvider {
- fun resolve(dri: DRI, sourceSets: List<DokkaSourceSet>, context: PageNode? = null): String
+ fun resolve(dri: DRI, sourceSets: Set<DokkaSourceSet>, context: PageNode? = null): String
fun resolve(node: PageNode, context: PageNode? = null, skipExtension: Boolean = false): String
fun resolveRoot(node: PageNode): String
fun ancestors(node: PageNode): List<PageNode>
diff --git a/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt
index 39b005a1..1d41bce0 100644
--- a/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt
+++ b/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt
@@ -14,7 +14,7 @@ class MultimoduleLocationProvider(private val root: RootPageNode, context: Dokka
it.name to it.path
}.toMap()
- override fun resolve(dri: DRI, sourceSets: List<DokkaSourceSet>, context: PageNode?): String =
+ override fun resolve(dri: DRI, sourceSets: Set<DokkaSourceSet>, context: PageNode?): String =
dri.takeIf { it.packageName == MULTIMODULE_PACKAGE_PLACEHOLDER }?.classNames?.let { paths[it] }?.let {
"$it/${dri.classNames}/index.html"
} ?: defaultLocationProvider.resolve(dri, sourceSets, context)