From dd44b839eac1b7b647e97f2cc73dd96bd054713b Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Thu, 28 May 2020 21:12:50 +0200 Subject: Refactor of Annotations and ExtraModifiers to be platform depedent --- core/src/main/kotlin/model/aditionalExtras.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt index fcf1efa6..b4355d4b 100644 --- a/core/src/main/kotlin/model/aditionalExtras.kt +++ b/core/src/main/kotlin/model/aditionalExtras.kt @@ -4,7 +4,7 @@ import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.properties.ExtraProperty import org.jetbrains.dokka.model.properties.MergeStrategy -class AdditionalModifiers(val content: Set) : ExtraProperty { +class AdditionalModifiers(val content: SourceSetDependent>) : ExtraProperty { companion object : ExtraProperty.Key { override fun mergeStrategyFor( left: AdditionalModifiers, @@ -19,6 +19,8 @@ class AdditionalModifiers(val content: Set) : ExtraProperty = AdditionalModifiers } +fun SourceSetDependent>.toAdditionalModifiers() = AdditionalModifiers(this) + class Annotations(val content: SourceSetDependent>) : ExtraProperty { companion object : ExtraProperty.Key { override fun mergeStrategyFor(left: Annotations, right: Annotations): MergeStrategy = @@ -37,6 +39,8 @@ class Annotations(val content: SourceSetDependent>) : ExtraProp } } +fun SourceSetDependent>.toAnnotations() = Annotations(this) + sealed class AnnotationParameterValue data class AnnotationValue(val annotation: Annotations.Annotation) : AnnotationParameterValue() data class ArrayValue(val value: List) : AnnotationParameterValue() -- cgit