diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-09-16 16:36:54 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | c8a83153a88fe6f5b50b6f459295421f90a21583 (patch) | |
tree | 4ce52c287dde3a8303549287ce67e58174d9f9fc /core/test-api | |
parent | 585178984228a9c2e5bd2af9b675094ac6e3fa46 (diff) | |
download | dokka-c8a83153a88fe6f5b50b6f459295421f90a21583.tar.gz dokka-c8a83153a88fe6f5b50b6f459295421f90a21583.tar.bz2 dokka-c8a83153a88fe6f5b50b6f459295421f90a21583.zip |
Extracting dokka generation to the dedicated extension point
Diffstat (limited to 'core/test-api')
-rw-r--r-- | core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt b/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt index 98f8965c..0f5814f6 100644 --- a/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt +++ b/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt @@ -1,7 +1,9 @@ package org.jetbrains.dokka.testApi.testRunner +import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaGenerator +import org.jetbrains.dokka.generation.SingleModuleGeneration import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.utilities.DokkaLogger @@ -19,31 +21,31 @@ internal class DokkaTestGenerator( dokkaGenerator.initializePlugins(configuration, logger, additionalPlugins) pluginsSetupStage(context) - verificationStage { - dokkaGenerator.validityCheck(context) - } + val singleModuleGeneration = context.single(CoreExtensions.generation) as SingleModuleGeneration - val modulesFromPlatforms = dokkaGenerator.createDocumentationModels(context) + val modulesFromPlatforms = singleModuleGeneration.createDocumentationModels() documentablesCreationStage(modulesFromPlatforms) - val filteredModules = dokkaGenerator.transformDocumentationModelBeforeMerge(modulesFromPlatforms, context) + verificationStage { singleModuleGeneration.validityCheck(context) } + + val filteredModules = singleModuleGeneration.transformDocumentationModelBeforeMerge(modulesFromPlatforms) documentablesFirstTransformationStep(filteredModules) - val documentationModel = dokkaGenerator.mergeDocumentationModels(filteredModules, context) + val documentationModel = singleModuleGeneration.mergeDocumentationModels(filteredModules) documentablesMergingStage(documentationModel) - val transformedDocumentation = dokkaGenerator.transformDocumentationModelAfterMerge(documentationModel, context) + val transformedDocumentation = singleModuleGeneration.transformDocumentationModelAfterMerge(documentationModel) documentablesTransformationStage(transformedDocumentation) - val pages = dokkaGenerator.createPages(transformedDocumentation, context) + val pages = singleModuleGeneration.createPages(transformedDocumentation) pagesGenerationStage(pages) - val transformedPages = dokkaGenerator.transformPages(pages, context) + val transformedPages = singleModuleGeneration.transformPages(pages) pagesTransformationStage(transformedPages) - dokkaGenerator.render(transformedPages, context) + singleModuleGeneration.render(transformedPages) renderingStage(transformedPages, context) - dokkaGenerator.reportAfterRendering(context) + singleModuleGeneration.reportAfterRendering() } } |