diff options
Diffstat (limited to 'testApi/src')
3 files changed, 2 insertions, 16 deletions
diff --git a/testApi/src/main/kotlin/testApi/context/MockContext.kt b/testApi/src/main/kotlin/testApi/context/MockContext.kt index 11520280..e3da5f68 100644 --- a/testApi/src/main/kotlin/testApi/context/MockContext.kt +++ b/testApi/src/main/kotlin/testApi/context/MockContext.kt @@ -1,7 +1,6 @@ package org.jetbrains.dokka.testApi.context import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.EnvironmentAndFacade import org.jetbrains.dokka.model.SourceSetCache import org.jetbrains.dokka.model.SourceSetData import org.jetbrains.dokka.plugability.DokkaContext @@ -16,7 +15,6 @@ import kotlin.reflect.full.memberProperties class MockContext( vararg extensions: Pair<ExtensionPoint<*>, (DokkaContext) -> Any>, private val testConfiguration: DokkaConfiguration? = null, - private val testSourceSets: Map<SourceSetData, EnvironmentAndFacade>? = null, private val unusedExtensionPoints: List<ExtensionPoint<*>>? = null, override val sourceSetCache: SourceSetCache ) : DokkaContext { @@ -41,8 +39,6 @@ class MockContext( override val configuration: DokkaConfiguration get() = testConfiguration ?: throw IllegalStateException("This mock context doesn't provide configuration") - override val platforms: Map<SourceSetData, EnvironmentAndFacade> - get() = testSourceSets ?: throw IllegalStateException("This mock context doesn't provide platforms data") override val unusedPoints: Collection<ExtensionPoint<*>> get() = unusedExtensionPoints ?: throw IllegalStateException("This mock context doesn't provide unused extension points") diff --git a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt index 2ca8523b..7248a4cb 100644 --- a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt +++ b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt @@ -2,7 +2,6 @@ package org.jetbrains.dokka.testApi.testRunner import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaGenerator -import org.jetbrains.dokka.EnvironmentAndFacade import org.jetbrains.dokka.model.SourceSetCache import org.jetbrains.dokka.model.SourceSetData import org.jetbrains.dokka.plugability.DokkaPlugin @@ -19,17 +18,11 @@ internal class DokkaTestGenerator( val dokkaGenerator = DokkaGenerator(configuration, logger) val sourceSetsCache = SourceSetCache() - val platforms: Map<SourceSetData, EnvironmentAndFacade> = dokkaGenerator.setUpAnalysis( - configuration, - sourceSetsCache - ) - analysisSetupStage(platforms) - val context = - dokkaGenerator.initializePlugins(configuration, logger, platforms, sourceSetsCache, pluginOverrides) + dokkaGenerator.initializePlugins(configuration, logger, sourceSetsCache, pluginOverrides) pluginsSetupStage(context) - val modulesFromPlatforms = dokkaGenerator.createDocumentationModels(platforms, context) + val modulesFromPlatforms = dokkaGenerator.createDocumentationModels(context, sourceSetsCache) documentablesCreationStage(modulesFromPlatforms) val filteredModules = dokkaGenerator.transformDocumentationModelBeforeMerge(modulesFromPlatforms, context) diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt index 9df20138..88595f85 100644 --- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt +++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt @@ -106,7 +106,6 @@ abstract class AbstractCoreTest { } protected class TestBuilder { - var analysisSetupStage: (Map<SourceSetData, EnvironmentAndFacade>) -> Unit = {} var pluginsSetupStage: (DokkaContext) -> Unit = {} var documentablesCreationStage: (List<DModule>) -> Unit = {} var documentablesFirstTransformationStep: (List<DModule>) -> Unit = {} @@ -118,7 +117,6 @@ abstract class AbstractCoreTest { @PublishedApi internal fun build() = TestMethods( - analysisSetupStage, pluginsSetupStage, documentablesCreationStage, documentablesFirstTransformationStep, @@ -240,7 +238,6 @@ abstract class AbstractCoreTest { } data class TestMethods( - val analysisSetupStage: (Map<SourceSetData, EnvironmentAndFacade>) -> Unit, val pluginsSetupStage: (DokkaContext) -> Unit, val documentablesCreationStage: (List<DModule>) -> Unit, val documentablesFirstTransformationStep: (List<DModule>) -> Unit, |