diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-06-23 13:09:09 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-06-24 10:47:42 +0200 |
commit | b7c4beec1b6317b1ceaf2520464996e9ee0e93e5 (patch) | |
tree | cc099aa8bec4cea1221aed5fe11f8e4da1bfec5c /plugins/javadoc | |
parent | 8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd (diff) | |
download | dokka-b7c4beec1b6317b1ceaf2520464996e9ee0e93e5.tar.gz dokka-b7c4beec1b6317b1ceaf2520464996e9ee0e93e5.tar.bz2 dokka-b7c4beec1b6317b1ceaf2520464996e9ee0e93e5.zip |
Make inherited functions and implemented intefaces source set dependent
Diffstat (limited to 'plugins/javadoc')
-rw-r--r-- | plugins/javadoc/src/main/kotlin/javadoc/KorteJavadocRenderer.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/KorteJavadocRenderer.kt b/plugins/javadoc/src/main/kotlin/javadoc/KorteJavadocRenderer.kt index f0835270..22b0225b 100644 --- a/plugins/javadoc/src/main/kotlin/javadoc/KorteJavadocRenderer.kt +++ b/plugins/javadoc/src/main/kotlin/javadoc/KorteJavadocRenderer.kt @@ -6,6 +6,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking +import org.jetbrains.dokka.Platform import org.jetbrains.dokka.base.renderers.OutputWriter import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.links.sureClassNames @@ -273,7 +274,8 @@ class KorteJavadocRenderer(val outputWriter: OutputWriter, val context: DokkaCon ) + renderJavadocContentNode(node.content) private fun renderImplementedInterfaces(node: JavadocClasslikePageNode) = - node.extras[ImplementedInterfaces]?.interfaces?.map { it.displayable() }.orEmpty() + node.extras[ImplementedInterfaces]?.interfaces?.entries?.firstOrNull { it.key.platform == Platform.jvm }?.value?.map { it.displayable() } // TODO: REMOVE HARDCODED JVM DEPENDENCY + .orEmpty() private fun renderClasslikeMethods(nodes: List<JavadocFunctionNode>): TemplateMap { val (inherited, own) = nodes.partition { it.extras[InheritedFunction]?.isInherited ?: false } @@ -292,7 +294,8 @@ class KorteJavadocRenderer(val outputWriter: OutputWriter, val context: DokkaCon private fun renderInheritedMethod(node: JavadocFunctionNode): TemplateMap { val inheritedFrom = node.extras[InheritedFunction]?.inheritedFrom return mapOf( - "inheritedFrom" to inheritedFrom?.displayable().orEmpty(), + "inheritedFrom" to inheritedFrom?.entries?.firstOrNull { it.key.platform == Platform.jvm }?.value?.displayable() // TODO: REMOVE HARDCODED JVM DEPENDENCY + .orEmpty(), "name" to node.name ) } |