From eed6dd88004992da4c3545b756c23b4e62e54043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Mon, 5 Dec 2022 14:55:41 +0100 Subject: Add support for "Added in " Teach Dokka to parse @sdkExtSince javadoc comments. These comments are equivalent to @apiSince, but for SDK extensions. Because symbols can be finalized in an Android dessert (@apiSince), an SDK extensions (@sdkExtSince) or both (@apiSince + @sdkExtSince), Dokka will emit one of the following snippets: - Added in API level - Added in - Added in API level Also in Bug: 261168446 Test: m ds-docs-kt # and manually inspect out/target/common/docs/ds-docs-kt-docs.zip Change-Id: Ia207d1284cda84ae612a955edfc67aecc75ac462 --- core/src/main/kotlin/Model/DocumentationNode.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/src/main/kotlin/Model/DocumentationNode.kt') diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index c84d4169d..7ac6d8f4a 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -64,6 +64,7 @@ enum class NodeKind { AttributeRef, ApiLevel, + SdkExtSince, DeprecatedLevel, @@ -120,6 +121,8 @@ open class DocumentationNode(val name: String, get() = references(RefKind.ExternalType).map { it.to }.firstOrNull() val apiLevel: DocumentationNode get() = detailOrNull(NodeKind.ApiLevel) ?: DocumentationNode("", Content.Empty, NodeKind.ApiLevel) + val sdkExtSince: DocumentationNode + get() = detailOrNull(NodeKind.SdkExtSince) ?: DocumentationNode("", Content.Empty, NodeKind.SdkExtSince) val deprecatedLevel: DocumentationNode get() = detailOrNull(NodeKind.DeprecatedLevel) ?: DocumentationNode("", Content.Empty, NodeKind.DeprecatedLevel) val artifactId: DocumentationNode -- cgit v1.2.3