aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/model/defaultValues.kt10
1 files changed, 8 insertions, 2 deletions
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, *>