aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/plugability/DokkaContext.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/plugability/DokkaContext.kt')
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt
index cefcd286..692803dd 100644
--- a/core/src/main/kotlin/plugability/DokkaContext.kt
+++ b/core/src/main/kotlin/plugability/DokkaContext.kt
@@ -2,7 +2,8 @@ package org.jetbrains.dokka.plugability
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.EnvironmentAndFacade
-import org.jetbrains.dokka.pages.PlatformData
+import org.jetbrains.dokka.model.SourceSetCache
+import org.jetbrains.dokka.model.SourceSetData
import org.jetbrains.dokka.utilities.DokkaLogger
import java.io.File
import java.net.URLClassLoader
@@ -19,9 +20,10 @@ interface DokkaContext {
fun <T, E> single(point: E): T where T : Any, E : ExtensionPoint<T>
+ val sourceSetCache: SourceSetCache
val logger: DokkaLogger
val configuration: DokkaConfiguration
- val platforms: Map<PlatformData, EnvironmentAndFacade>
+ val platforms: Map<SourceSetData, EnvironmentAndFacade>
val unusedPoints: Collection<ExtensionPoint<*>>
@@ -29,10 +31,11 @@ interface DokkaContext {
fun create(
configuration: DokkaConfiguration,
logger: DokkaLogger,
- platforms: Map<PlatformData, EnvironmentAndFacade>,
+ sourceSets: Map<SourceSetData, EnvironmentAndFacade>,
+ sourceSetsCache: SourceSetCache,
pluginOverrides: List<DokkaPlugin>
): DokkaContext =
- DokkaContextConfigurationImpl(logger, configuration, platforms).apply {
+ DokkaContextConfigurationImpl(logger, configuration, sourceSets, sourceSetsCache).apply {
// File(it.path) is a workaround for an incorrect filesystem in a File instance returned by Gradle.
configuration.pluginsClasspath.map { File(it.path).toURI().toURL() }
.toTypedArray()
@@ -56,7 +59,8 @@ interface DokkaContextConfiguration {
private class DokkaContextConfigurationImpl(
override val logger: DokkaLogger,
override val configuration: DokkaConfiguration,
- override val platforms: Map<PlatformData, EnvironmentAndFacade>
+ override val platforms: Map<SourceSetData, EnvironmentAndFacade>,
+ override val sourceSetCache: SourceSetCache
) : DokkaContext, DokkaContextConfiguration {
private val plugins = mutableMapOf<KClass<*>, DokkaPlugin>()
private val pluginStubs = mutableMapOf<KClass<*>, DokkaPlugin>()