aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-11-16 19:46:31 +0100
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-27 03:15:02 +0100
commit076a5f421c5e4621539efd814be612f43fef33f5 (patch)
tree90b399c459cccbd1e3010778320d49b7b806b1fb /core/src/main/kotlin
parentc203be9fb65ee221875b4e1c865bcd289a85e69c (diff)
downloaddokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.gz
dokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.bz2
dokka-076a5f421c5e4621539efd814be612f43fef33f5.zip
Adding inter-module link resolving template strategy for Gfm
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/links/DRI.kt1
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt6
2 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt
index a69fa4e3..25b9546f 100644
--- a/core/src/main/kotlin/links/DRI.kt
+++ b/core/src/main/kotlin/links/DRI.kt
@@ -19,6 +19,7 @@ data class DRI(
companion object {
val topLevel = DRI()
+
}
}
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt
index ee3215cc..9c9e6978 100644
--- a/core/src/main/kotlin/plugability/DokkaContext.kt
+++ b/core/src/main/kotlin/plugability/DokkaContext.kt
@@ -1,6 +1,5 @@
package org.jetbrains.dokka.plugability
-import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.utilities.DokkaLogger
import java.io.File
@@ -9,7 +8,6 @@ import java.util.*
import kotlin.reflect.KClass
import kotlin.reflect.full.createInstance
-
interface DokkaContext {
fun <T : DokkaPlugin> plugin(kclass: KClass<T>): T?
@@ -22,7 +20,6 @@ interface DokkaContext {
val configuration: DokkaConfiguration
val unusedPoints: Collection<ExtensionPoint<*>>
-
companion object {
fun create(
configuration: DokkaConfiguration,
@@ -192,6 +189,9 @@ private class DokkaContextConfigurationImpl(
}
if (extension.override is OverrideKind.Present) {
+ fun root(ext: Extension<*, *, *>): List<Extension<*, *, *>> = if (ext.override is OverrideKind.Present) ext.override.overriden.flatMap(::root) else listOf(ext)
+ if (extension.override.overriden.size > 1 && root(extension).distinct().size > 1)
+ throw IllegalStateException("Extension $extension overrides extensions without common root")
extension.override.overriden.forEach { overriden ->
suppressedExtensions.listFor(overriden) += Suppression.ByExtension(extension)
}