aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/pages/annotations
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/transformers/pages/annotations
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages/annotations')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt
index 4ef02ffd..9ff5960d 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/annotations/SinceKotlinTransformer.kt
@@ -18,7 +18,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.transformers.documentation.DocumentableTransformer
import org.jetbrains.dokka.utilities.associateWithNotNull
-class SinceKotlinVersion constructor(str: String) : Comparable<SinceKotlinVersion> {
+public class SinceKotlinVersion(str: String) : Comparable<SinceKotlinVersion> {
private val parts: List<Int> = str.split(".").map { it.toInt() }
/**
@@ -39,7 +39,9 @@ class SinceKotlinVersion constructor(str: String) : Comparable<SinceKotlinVersio
override fun toString(): String = parts.joinToString(".")
}
-class SinceKotlinTransformer(val context: DokkaContext) : DocumentableTransformer {
+public class SinceKotlinTransformer(
+ public val context: DokkaContext
+) : DocumentableTransformer {
private val minSinceKotlinVersionOfPlatform = mapOf(
Platform.common to SinceKotlinVersion("1.0"),
@@ -49,7 +51,7 @@ class SinceKotlinTransformer(val context: DokkaContext) : DocumentableTransforme
Platform.wasm to SinceKotlinVersion("1.8"),
)
- override fun invoke(original: DModule, context: DokkaContext) = original.transform() as DModule
+ override fun invoke(original: DModule, context: DokkaContext): DModule = original.transform() as DModule
private fun <T : Documentable> T.transform(parent: SourceSetDependent<SinceKotlinVersion>? = null): Documentable {
val versions = calculateVersions(parent)