diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-08-26 12:15:22 +0200 |
---|---|---|
committer | Marcin Aman <marcin.aman@gmail.com> | 2021-08-26 12:15:22 +0200 |
commit | 622d59822e709438802b72d82afef025b43dd564 (patch) | |
tree | 016df910626187ba3cfef4aa4af3105111085330 /plugins/base/src/main/kotlin | |
parent | a3997262b7c7382549cd7f3b50dfd9cb63b277b0 (diff) | |
download | dokka-622d59822e709438802b72d82afef025b43dd564.tar.gz dokka-622d59822e709438802b72d82afef025b43dd564.tar.bz2 dokka-622d59822e709438802b72d82afef025b43dd564.zip |
Bump compiler to 1.5.30, language level to 1.5
Diffstat (limited to 'plugins/base/src/main/kotlin')
3 files changed, 3 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt index 94e27424..8cee22b2 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt @@ -7,7 +7,6 @@ import org.jetbrains.dokka.model.properties.MergeStrategy import org.jetbrains.dokka.model.properties.mergeExtras import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.transformers.documentation.DocumentableMerger -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult internal class DefaultDocumentableMerger(val context: DokkaContext) : DocumentableMerger { private val dependencyInfo = context.getDependencyInfo() @@ -21,7 +20,7 @@ internal class DefaultDocumentableMerger(val context: DokkaContext) : Documentab list.flatMap { it.packages } ) { pck1, pck2 -> pck1.mergeWith(pck2) }, documentation = list.map { it.documentation }.flatMap { it.entries }.associate { (k, v) -> k to v }, - expectPresentInSet = list.firstNotNullResult { it.expectPresentInSet }, + expectPresentInSet = list.firstNotNullOfOrNull { it.expectPresentInSet }, sourceSets = list.flatMap { it.sourceSets }.toSet() ).mergeExtras(left, right) } diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index d986056c..88dde911 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -63,7 +63,6 @@ import org.jetbrains.kotlin.types.* import org.jetbrains.kotlin.types.typeUtil.immediateSupertypes import org.jetbrains.kotlin.types.typeUtil.isAnyOrNullableAny import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult import org.jetbrains.kotlin.utils.addToStdlib.safeAs import java.nio.file.Paths import org.jetbrains.kotlin.resolve.constants.AnnotationValue as ConstantsAnnotationValue @@ -892,7 +891,7 @@ private class DokkaDescriptorVisitor( private fun DeclarationDescriptor.getJavaDocs() = (this as? CallableDescriptor) ?.overriddenDescriptors ?.mapNotNull { it.findPsi() as? PsiNamedElement } - ?.firstNotNullResult { javadocParser.parseDocumentation(it) } + ?.firstNotNullOfOrNull { javadocParser.parseDocumentation(it) } private suspend fun ClassDescriptor.companion(dri: DRIWithPlatformInfo): DObject? = companionObjectDescriptor?.let { objectDescriptor(it, dri) diff --git a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt index 81ddb6ed..2d300ea8 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt @@ -3,13 +3,12 @@ package org.jetbrains.dokka.base.translators.documentables import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.model.withDescendants import org.jetbrains.dokka.pages.* -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult import org.jetbrains.kotlin.utils.addToStdlib.safeAs fun firstParagraphBrief(docTag: DocTag): DocTag? = when(docTag){ is P -> docTag - is CustomDocTag -> docTag.children.firstNotNullResult { firstParagraphBrief(it) } + is CustomDocTag -> docTag.children.firstNotNullOfOrNull { firstParagraphBrief(it) } is Text -> docTag else -> null } |