aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-04 17:51:28 +0200
committerGitHub <noreply@github.com>2023-08-04 17:51:28 +0200
commit0be397336e89782cda94c8bf55005a2be9abecde (patch)
treead6b13828bd18a26b3de26b447b88ab4b2e8719f /plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt
parentddcaa1864ffc26e8482770ad2c16ba424af8a0ac (diff)
downloaddokka-0be397336e89782cda94c8bf55005a2be9abecde.tar.gz
dokka-0be397336e89782cda94c8bf55005a2be9abecde.tar.bz2
dokka-0be397336e89782cda94c8bf55005a2be9abecde.zip
Reintroduce removed analysis APIs with a deprecation message (#3104)
Diffstat (limited to 'plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt')
-rw-r--r--plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt73
1 files changed, 73 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt b/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt
new file mode 100644
index 00000000..ad71de2e
--- /dev/null
+++ b/plugins/base/src/main/kotlin/deprecated/KotlinAnalysisDeprecatedApi.kt
@@ -0,0 +1,73 @@
+@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)
+abstract class KotlinAnalysis(
+ private val parent: KotlinAnalysis? = null
+) : Closeable {
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ operator fun get(key: DokkaConfiguration.DokkaSourceSet): AnalysisContext = throw AnalysisApiDeprecatedError()
+
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ operator fun get(key: DokkaSourceSetID): AnalysisContext = throw AnalysisApiDeprecatedError()
+
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ protected abstract fun find(sourceSetID: DokkaSourceSetID): AnalysisContext?
+}
+
+class AnalysisContext(environment: Any, facade: Any, private val analysisEnvironment: Any) : Closeable {
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ val environment: Any get() = throw AnalysisApiDeprecatedError()
+
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ val facade: Any get() = throw AnalysisApiDeprecatedError()
+
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ operator fun component1(): Any = throw AnalysisApiDeprecatedError()
+
+ @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+ 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)
+class DokkaAnalysisConfiguration(val ignoreCommonBuiltIns: Boolean = false)
+
+@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+fun KotlinAnalysis(context: DokkaContext): KotlinAnalysis = throw AnalysisApiDeprecatedError()
+
+@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+fun KotlinAnalysis(
+ sourceSets: List<DokkaConfiguration.DokkaSourceSet>,
+ logger: DokkaLogger,
+ analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration()
+): KotlinAnalysis = throw AnalysisApiDeprecatedError()
+
+@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+fun ProjectKotlinAnalysis(
+ sourceSets: List<DokkaConfiguration.DokkaSourceSet>,
+ logger: DokkaLogger,
+ analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration()
+): KotlinAnalysis = throw AnalysisApiDeprecatedError()
+
+@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR)
+fun SamplesKotlinAnalysis(
+ sourceSets: List<DokkaConfiguration.DokkaSourceSet>,
+ logger: DokkaLogger,
+ projectKotlinAnalysis: KotlinAnalysis,
+ analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration()
+): KotlinAnalysis = throw AnalysisApiDeprecatedError()
+