From 9559158bfeeb274e9ccf1b4563f1b23b42afc493 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 5 Jul 2023 10:04:55 +0200 Subject: Decompose Kotlin/Java analysis (#3034) * Extract analysis into separate modules --- .../ContextModuleAndPackageDocumentationReaderTest3.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt') diff --git a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt index 609f808d..4a8a81f2 100644 --- a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt +++ b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt @@ -1,10 +1,12 @@ package transformers -import org.jetbrains.dokka.base.transformers.documentables.ModuleAndPackageDocumentationReader import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.plugability.plugin +import org.jetbrains.dokka.plugability.querySingle import org.jetbrains.dokka.utilities.DokkaConsoleLogger import org.jetbrains.dokka.utilities.LoggingLevel +import org.jetbrains.kotlin.analysis.kotlin.internal.InternalKotlinAnalysisPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import testApi.testRunner.TestDokkaConfigurationBuilder @@ -42,12 +44,12 @@ class ContextModuleAndPackageDocumentationReaderTest3 : AbstractContextModuleAnd ) } - private val reader by lazy { ModuleAndPackageDocumentationReader(context) } + private val reader by lazy { context.plugin().querySingle { moduleAndPackageDocumentationReader } } @Test fun `root package is matched by empty string and the root keyword`() { - val documentation = reader[dPackage(DRI(""), sourceSets = setOf(sourceSet))] + val documentation = reader.read(dPackage(DRI(""), sourceSets = setOf(sourceSet))) assertEquals( listOf("This is the root package", "This is also the root package"), documentation.texts ) -- cgit