diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2023-02-24 19:16:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 19:16:54 +0200 |
commit | b730bf43d93c60df2fc3a1b0b25485b1458a9488 (patch) | |
tree | 163aca76050405db1352f73d4b8e3baa4a712c88 /plugins/base | |
parent | 1040288ca76e070445f1400df2fcc5a56310be28 (diff) | |
download | dokka-b730bf43d93c60df2fc3a1b0b25485b1458a9488.tar.gz dokka-b730bf43d93c60df2fc3a1b0b25485b1458a9488.tar.bz2 dokka-b730bf43d93c60df2fc3a1b0b25485b1458a9488.zip |
Mark Plugin Api as experimental (#2743)
Diffstat (limited to 'plugins/base')
6 files changed, 37 insertions, 1 deletions
diff --git a/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt index 67e62c36..757a252b 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt @@ -3,6 +3,8 @@ package utils import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.OutputWriter import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import java.util.* class TestOutputWriterPlugin(failOnOverwrite: Boolean = true) : DokkaPlugin() { @@ -15,6 +17,10 @@ class TestOutputWriterPlugin(failOnOverwrite: Boolean = true) : DokkaPlugin() { with writer override dokkaBase.fileWriter) } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } class TestOutputWriter(private val failOnOverwrite: Boolean = true) : OutputWriter { diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt index f76eef63..8fc46870 100644 --- a/plugins/base/src/main/kotlin/DokkaBase.kt +++ b/plugins/base/src/main/kotlin/DokkaBase.kt @@ -37,6 +37,8 @@ import org.jetbrains.dokka.base.translators.descriptors.ExternalClasslikesTransl import org.jetbrains.dokka.base.translators.descriptors.ExternalDocumentablesProvider import org.jetbrains.dokka.base.utils.NoopIntellijLoggerFactory import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.jetbrains.dokka.plugability.querySingle import org.jetbrains.dokka.renderers.PostAction import org.jetbrains.dokka.transformers.documentation.PreMergeDocumentableTransformer @@ -292,4 +294,8 @@ class DokkaBase : DokkaPlugin() { com.intellij.openapi.diagnostic.Logger.setFactory(NoopIntellijLoggerFactory()) } } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } diff --git a/plugins/base/src/test/kotlin/model/InheritorsTest.kt b/plugins/base/src/test/kotlin/model/InheritorsTest.kt index 1be21afa..265bb7a0 100644 --- a/plugins/base/src/test/kotlin/model/InheritorsTest.kt +++ b/plugins/base/src/test/kotlin/model/InheritorsTest.kt @@ -11,6 +11,8 @@ import org.jetbrains.dokka.model.DInterface import org.jetbrains.dokka.model.doc.P import org.jetbrains.dokka.model.doc.Text import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import utils.AbstractModelTest @@ -165,6 +167,10 @@ class InheritorsTest : AbstractModelTest("/src/main/kotlin/inheritors/Test.kt", ) } override dokkaBase.defaultKotlinAnalysis } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } @Test fun `should inherit docs for stdLib #2638`() { diff --git a/plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt b/plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt index 989b82ef..a751f071 100644 --- a/plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt +++ b/plugins/base/src/test/kotlin/resourceLinks/ResourceLinksTest.kt @@ -9,6 +9,8 @@ import org.jetbrains.dokka.base.templating.toJsonString import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.pages.RootPageNode import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.jetbrains.dokka.transformers.pages.PageTransformer import org.jsoup.Jsoup import org.junit.jupiter.api.Test @@ -32,6 +34,10 @@ class ResourceLinksTest : BaseAbstractTest() { val appender by extending { plugin<DokkaBase>().htmlPreprocessors with TestResourcesAppender(resources) } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } @Test diff --git a/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt b/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt index 686b4990..5b97f969 100644 --- a/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt +++ b/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt @@ -5,6 +5,8 @@ import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.model.dfs +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.jetbrains.dokka.transformers.pages.PageTransformer import org.jetbrains.dokka.transformers.pages.pageMapper import org.jetbrains.dokka.transformers.pages.pageScanner @@ -18,6 +20,10 @@ class PageTransformerBuilderTest : BaseAbstractTest() { class ProxyPlugin(transformer: PageTransformer) : DokkaPlugin() { val pageTransformer by extending { CoreExtensions.pageTransformer with transformer } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } @Test @@ -136,7 +142,7 @@ class PageTransformerBuilderTest : BaseAbstractTest() { } @Test - fun `kotlin constructors should exist even though there is primary constructor only`() { + fun `kotlin constructors tab should exist even though there is primary constructor only`() { val configuration = dokkaConfiguration { sourceSets { sourceSet { diff --git a/plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt b/plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt index 5ce6bbb6..b06fe26c 100644 --- a/plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt +++ b/plugins/base/src/test/kotlin/translators/DefaultPsiToDocumentableTranslatorTest.kt @@ -8,6 +8,8 @@ import org.jetbrains.dokka.links.PointingToDeclaration import org.jetbrains.dokka.model.* import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test import utils.assertNotNull @@ -327,6 +329,10 @@ class DefaultPsiToDocumentableTranslatorTest : BaseAbstractTest() { (dokkaBase.psiToDocumentableTranslator override dokkaBase.descriptorToDocumentableTranslator) } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = + PluginApiPreviewAcknowledgement } // for Kotlin classes from DefaultPsiToDocumentableTranslator |