diff options
| author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2022-12-16 01:27:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-16 01:27:30 +0200 |
| commit | b7a5eac3fc848501735b3520fc12f6f5d21b9bd4 (patch) | |
| tree | 42c066549023a3d3ecb953b3c2ba71f07ae22e90 /plugins/base/src/main/kotlin/transformers/documentables | |
| parent | f6ea66cf10f399208ba5c8b01ad5bf323350f651 (diff) | |
| download | dokka-b7a5eac3fc848501735b3520fc12f6f5d21b9bd4.tar.gz dokka-b7a5eac3fc848501735b3520fc12f6f5d21b9bd4.tar.bz2 dokka-b7a5eac3fc848501735b3520fc12f6f5d21b9bd4.zip | |
Display `SinceKotlin` everywhere (#2708)
* Introduce `extraOptions`
* Make 'SinceKotlin' option
* Display 'SinceKotlin' everywhere
* Dump API
* Fix CLI bug
* Show custom tags in property brief
* Show custom tags in extension brief
* Show `SinceKotlin` for TypeAlias
* Fix `stdlib.diff`
* Add a test
* Display doc for actual typealias
* Propagate SinceKotlin
* Refactor
* Refactor in `SinceKotlinTransformer`
* Revert "Introduce `extraOptions`"
This reverts commit b83fdf5da31a97e2ae037f46a735d34a2f84d2ec.
* Revert "Make 'SinceKotlin' option"
This reverts commit 69f4641d1776f3a4bcd361919212c2de7fa2364e.
* Introduce `dokka.SinceKotlin` system property instead of extra arg
* Fix API
* Fix tests
* Rename
* Spread on extensions
* Put doc and rename prop
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables')
| -rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt b/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt index 58c601bc..e895db60 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt @@ -67,12 +67,32 @@ class ActualTypealiasAdder : DocumentableTransformer { if (element.expectPresentInSet != null) { typealiases[element.dri]?.let { ta -> val merged = element.withNewExtras(element.extra + ActualTypealias(ta.underlyingType)).let { - when(it) { - is DClass -> it.copy(sourceSets = element.sourceSets + ta.sourceSets) - is DEnum -> it.copy(sourceSets = element.sourceSets + ta.sourceSets) - is DInterface -> it.copy(sourceSets = element.sourceSets + ta.sourceSets) - is DObject -> it.copy(sourceSets = element.sourceSets + ta.sourceSets) - is DAnnotation -> it.copy(sourceSets = element.sourceSets + ta.sourceSets) + when (it) { + is DClass -> it.copy( + documentation = element.documentation + ta.documentation, + sourceSets = element.sourceSets + ta.sourceSets + ) + + is DEnum -> it.copy( + documentation = element.documentation + ta.documentation, + sourceSets = element.sourceSets + ta.sourceSets + ) + + is DInterface -> it.copy( + documentation = element.documentation + ta.documentation, + sourceSets = element.sourceSets + ta.sourceSets + ) + + is DObject -> it.copy( + documentation = element.documentation + ta.documentation, + sourceSets = element.sourceSets + ta.sourceSets + ) + + is DAnnotation -> it.copy( + documentation = element.documentation + ta.documentation, + sourceSets = element.sourceSets + ta.sourceSets + ) + else -> throw IllegalStateException("${it::class.qualifiedName} ${it.name} cannot have copy its sourceSets") } } |
