diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/api/core.api | 3 | ||||
-rw-r--r-- | core/src/main/kotlin/model/defaultValues.kt | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/core/api/core.api b/core/api/core.api index 74b4b422..8add4bd8 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -1385,7 +1385,8 @@ public final class org/jetbrains/dokka/model/DTypeParameter : org/jetbrains/dokk public final class org/jetbrains/dokka/model/DefaultValue : org/jetbrains/dokka/model/properties/ExtraProperty { public static final field Companion Lorg/jetbrains/dokka/model/DefaultValue$Companion; - public fun <init> (Lorg/jetbrains/dokka/model/Expression;)V + public fun <init> (Ljava/util/Map;)V + public final fun getExpression ()Ljava/util/Map; public fun getKey ()Lorg/jetbrains/dokka/model/properties/ExtraProperty$Key; public final fun getValue ()Lorg/jetbrains/dokka/model/Expression; } diff --git a/core/src/main/kotlin/model/defaultValues.kt b/core/src/main/kotlin/model/defaultValues.kt index d9caecd9..a118eb4d 100644 --- a/core/src/main/kotlin/model/defaultValues.kt +++ b/core/src/main/kotlin/model/defaultValues.kt @@ -3,9 +3,15 @@ package org.jetbrains.dokka.model import org.jetbrains.dokka.model.properties.ExtraProperty import org.jetbrains.dokka.model.properties.MergeStrategy -class DefaultValue(val value: Expression): ExtraProperty<Documentable> { +class DefaultValue(val expression: SourceSetDependent<Expression>): ExtraProperty<Documentable> { + + @Deprecated("Use `expression` property that depends on source set", ReplaceWith("this.expression.values.first()")) + val value: Expression + get() = expression.values.first() companion object : ExtraProperty.Key<Documentable, DefaultValue> { - override fun mergeStrategyFor(left: DefaultValue, right: DefaultValue): MergeStrategy<Documentable> = MergeStrategy.Remove // TODO pass a logger somehow and log this + override fun mergeStrategyFor(left: DefaultValue, right: DefaultValue): MergeStrategy<Documentable> = + MergeStrategy.Replace(DefaultValue(left.expression + right.expression)) + } override val key: ExtraProperty.Key<Documentable, *> |