From b9f426a65f7b98a678478222646a23f10425681f Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Thu, 12 Mar 2020 21:42:07 +0100 Subject: Adding documentable filtering based on visibility --- testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt | 7 +++++-- testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'testApi') diff --git a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt index ddee7083..0e77344d 100644 --- a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt +++ b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt @@ -26,10 +26,13 @@ internal class DokkaTestGenerator( val modulesFromPlatforms = dokkaGenerator.createDocumentationModels(platforms, context) documentablesCreationStage(modulesFromPlatforms) - val documentationModel = dokkaGenerator.mergeDocumentationModels(modulesFromPlatforms, context) + val filteredModules = dokkaGenerator.transformDocumentationModelBeforeMerge(modulesFromPlatforms, context) + documentablesFirstTransformationStep(filteredModules) + + val documentationModel = dokkaGenerator.mergeDocumentationModels(filteredModules, context) documentablesMergingStage(documentationModel) - val transformedDocumentation = dokkaGenerator.transformDocumentationModel(documentationModel, context) + val transformedDocumentation = dokkaGenerator.transformDocumentationModelAfterMerge(documentationModel, context) documentablesTransformationStage(transformedDocumentation) val pages = dokkaGenerator.createPages(transformedDocumentation, context) diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt index a0e3b709..64d16fef 100644 --- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt +++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt @@ -105,6 +105,7 @@ abstract class AbstractCoreTest { var analysisSetupStage: (Map) -> Unit = {} var pluginsSetupStage: (DokkaContext) -> Unit = {} var documentablesCreationStage: (List) -> Unit = {} + var documentablesFirstTransformationStep: (List) -> Unit = {} var documentablesMergingStage: (DModule) -> Unit = {} var documentablesTransformationStage: (DModule) -> Unit = {} var pagesGenerationStage: (ModulePageNode) -> Unit = {} @@ -115,6 +116,7 @@ abstract class AbstractCoreTest { analysisSetupStage, pluginsSetupStage, documentablesCreationStage, + documentablesFirstTransformationStep, documentablesMergingStage, documentablesTransformationStage, pagesGenerationStage, @@ -217,6 +219,7 @@ data class TestMethods( val analysisSetupStage: (Map) -> Unit, val pluginsSetupStage: (DokkaContext) -> Unit, val documentablesCreationStage: (List) -> Unit, + val documentablesFirstTransformationStep: (List) -> Unit, val documentablesMergingStage: (DModule) -> Unit, val documentablesTransformationStage: (DModule) -> Unit, val pagesGenerationStage: (ModulePageNode) -> Unit, -- cgit