From 8e5c63d035ef44a269b8c43430f43f5c8eebfb63 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Fri, 10 Nov 2023 11:46:54 +0100 Subject: Restructure the project to utilize included builds (#3174) * Refactor and simplify artifact publishing * Update Gradle to 8.4 * Refactor and simplify convention plugins and build scripts Fixes #3132 --------- Co-authored-by: Adam <897017+aSemy@users.noreply.github.com> Co-authored-by: Oleg Yukhnevich --- .../deprecated/AnalysisApiDeprecatedError.kt | 16 ----- .../deprecated/KotlinAnalysisDeprecatedApi.kt | 77 ---------------------- .../main/kotlin/deprecated/ParsersDeprecatedAPI.kt | 42 ------------ .../deprecated/ParsersFactoriesDeprecatedAPI.kt | 24 ------- .../TranslatorDescriptorsDeprecatedAPI.kt | 50 -------------- .../deprecated/TranslatorPsiDeprecatedAPI.kt | 25 ------- 6 files changed, 234 deletions(-) delete mode 100644 plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt delete mode 100644 plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt delete mode 100644 plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt delete mode 100644 plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt delete mode 100644 plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt delete mode 100644 plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt (limited to 'plugins/base/src/main/kotlin/deprecated') diff --git a/plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt b/plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt deleted file mode 100644 index 52280b3e..00000000 --- a/plugins/base/src/main/kotlin/deprecated/AnalysisApiDeprecatedError.kt +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.base.deprecated - -import org.jetbrains.dokka.InternalDokkaApi - -// TODO all API that mentions this message or error can be removed in Dokka >= 2.1 - -internal const val ANALYSIS_API_DEPRECATION_MESSAGE = - "Dokka's Analysis API has been reworked. Please, see the following issue for details and migration options: " + - "https://github.com/Kotlin/dokka/issues/3099" - -@InternalDokkaApi -public class AnalysisApiDeprecatedError : Error(ANALYSIS_API_DEPRECATION_MESSAGE) diff --git a/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt b/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt deleted file mode 100644 index 1d9e7e9f..00000000 --- a/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("PackageDirectoryMismatch", "FunctionName", "UNUSED_PARAMETER", "unused", "DEPRECATION_ERROR", - "DeprecatedCallableAddReplaceWith", "unused" -) - -package org.jetbrains.dokka.analysis - -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.DokkaSourceSetID -import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE -import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError -import org.jetbrains.dokka.plugability.DokkaContext -import org.jetbrains.dokka.utilities.DokkaLogger -import java.io.Closeable - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public abstract class KotlinAnalysis( - private val parent: KotlinAnalysis? = null -) : Closeable { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public operator fun get(key: DokkaConfiguration.DokkaSourceSet): AnalysisContext = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public operator fun get(key: DokkaSourceSetID): AnalysisContext = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - protected abstract fun find(sourceSetID: DokkaSourceSetID): AnalysisContext? -} - -public class AnalysisContext(environment: Any, facade: Any, private val analysisEnvironment: Any) : Closeable { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public val environment: Any get() = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public val facade: Any get() = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public operator fun component1(): Any = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public operator fun component2(): Any = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - override fun close() { throw AnalysisApiDeprecatedError() } -} - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public class DokkaAnalysisConfiguration(public val ignoreCommonBuiltIns: Boolean = false) - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun KotlinAnalysis(context: DokkaContext): KotlinAnalysis = throw AnalysisApiDeprecatedError() - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun KotlinAnalysis( - sourceSets: List, - logger: DokkaLogger, - analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration() -): KotlinAnalysis = throw AnalysisApiDeprecatedError() - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun ProjectKotlinAnalysis( - sourceSets: List, - logger: DokkaLogger, - analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration() -): KotlinAnalysis = throw AnalysisApiDeprecatedError() - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun SamplesKotlinAnalysis( - sourceSets: List, - logger: DokkaLogger, - projectKotlinAnalysis: KotlinAnalysis, - analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration() -): KotlinAnalysis = throw AnalysisApiDeprecatedError() - diff --git a/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt b/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt deleted file mode 100644 index 55b1daab..00000000 --- a/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("PackageDirectoryMismatch", "DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith", "unused") - -package org.jetbrains.dokka.base.parsers - -import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE -import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError -import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.doc.DocTag -import org.jetbrains.dokka.model.doc.DocumentationNode -import org.jetbrains.dokka.model.doc.TagWrapper - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public abstract class Parser { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public open fun parseStringToDocNode(extractedString: String): DocTag = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public open fun preparse(text: String): String = throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public open fun parseTagWithBody(tagName: String, content: String): TagWrapper = throw AnalysisApiDeprecatedError() -} - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public open class MarkdownParser( - private val externalDri: (String) -> DRI?, - private val kdocLocation: String?, -) : Parser() { - public companion object { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public fun parseFromKDocTag( - @Suppress("UNUSED_PARAMETER") kDocTag: Any?, - @Suppress("UNUSED_PARAMETER") externalDri: (String) -> DRI?, - @Suppress("UNUSED_PARAMETER") kdocLocation: String?, - @Suppress("UNUSED_PARAMETER") parseWithChildren: Boolean = true - ): DocumentationNode = throw AnalysisApiDeprecatedError() - } -} diff --git a/plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt b/plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt deleted file mode 100644 index 7b84803c..00000000 --- a/plugins/base/src/main/kotlin/deprecated/ParsersFactoriesDeprecatedAPI.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("DeprecatedCallableAddReplaceWith", "PackageDirectoryMismatch", "unused") - -package org.jetbrains.dokka.base.parsers.factories - -import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE -import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError -import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.doc.DocTag - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public object DocTagsFromStringFactory { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public fun getInstance( - @Suppress("UNUSED_PARAMETER") name: String, - @Suppress("UNUSED_PARAMETER") children: List = emptyList(), - @Suppress("UNUSED_PARAMETER") params: Map = emptyMap(), - @Suppress("UNUSED_PARAMETER") body: String? = null, - @Suppress("UNUSED_PARAMETER") dri: DRI? = null, - ): DocTag = throw AnalysisApiDeprecatedError() -} diff --git a/plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt b/plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt deleted file mode 100644 index 87d82ccf..00000000 --- a/plugins/base/src/main/kotlin/deprecated/TranslatorDescriptorsDeprecatedAPI.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("PackageDirectoryMismatch", "DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith", "unused") - -package org.jetbrains.dokka.base.translators.descriptors - -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE -import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError -import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.DClasslike -import org.jetbrains.dokka.model.DModule -import org.jetbrains.dokka.plugability.DokkaContext -import org.jetbrains.dokka.transformers.sources.AsyncSourceToDocumentableTranslator - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun interface ExternalDocumentablesProvider { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public fun findClasslike(dri: DRI, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike? -} - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public class DefaultExternalDocumentablesProvider( - @Suppress("UNUSED_PARAMETER") context: DokkaContext -) : ExternalDocumentablesProvider { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - override fun findClasslike(dri: DRI, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike = - throw AnalysisApiDeprecatedError() -} - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public fun interface ExternalClasslikesTranslator { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - public fun translateClassDescriptor(descriptor: Any, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike -} - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public class DefaultDescriptorToDocumentableTranslator( - private val context: DokkaContext -) : AsyncSourceToDocumentableTranslator, ExternalClasslikesTranslator { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - override suspend fun invokeSuspending(sourceSet: DokkaConfiguration.DokkaSourceSet, context: DokkaContext, ): DModule = - throw AnalysisApiDeprecatedError() - - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - override fun translateClassDescriptor(descriptor: Any, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike = - throw AnalysisApiDeprecatedError() -} diff --git a/plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt b/plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt deleted file mode 100644 index 1906a7b1..00000000 --- a/plugins/base/src/main/kotlin/deprecated/TranslatorPsiDeprecatedAPI.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -@file:Suppress("PackageDirectoryMismatch", "DeprecatedCallableAddReplaceWith", "unused") - -package org.jetbrains.dokka.base.translators.psi - -import org.jetbrains.dokka.DokkaConfiguration -import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE -import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError -import org.jetbrains.dokka.model.DModule -import org.jetbrains.dokka.plugability.DokkaContext -import org.jetbrains.dokka.transformers.sources.AsyncSourceToDocumentableTranslator - -@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) -public class DefaultPsiToDocumentableTranslator( - @Suppress("UNUSED_PARAMETER") context: DokkaContext, -) : AsyncSourceToDocumentableTranslator { - @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) - override suspend fun invokeSuspending( - sourceSet: DokkaConfiguration.DokkaSourceSet, - context: DokkaContext, - ): DModule = throw AnalysisApiDeprecatedError() -} -- cgit