aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-05-31 23:57:28 +0300
committerGitHub <noreply@github.com>2022-05-31 23:57:28 +0300
commit73f78dc34bbcb683f345192629bdbc631035887e (patch)
tree1ebdd3d0312c3742cfcfc0b199b26fb0d5a57f47 /plugins/base
parent623cf222ca2ac5e8b9628af5927956ecb6d44d1e (diff)
downloaddokka-73f78dc34bbcb683f345192629bdbc631035887e.tar.gz
dokka-73f78dc34bbcb683f345192629bdbc631035887e.tar.bz2
dokka-73f78dc34bbcb683f345192629bdbc631035887e.zip
Bump Kotlin to 1.7.0-RC (#2508)
* `UnresolvedType` is replaced with `ErrorType` in https://github.com/JetBrains/kotlin/commit/b5933c70e20a0dfd788d8d4a6c04ca0d16f7c731 * Support `sig` files in https://github.com/JetBrains/kotlin/commit/22b368849338cae684601c9b1ead31ebb1fd81cf * `org.jetbrains.kotlin.idea.kdoc.resolveKDocSampleLink` is removed in https://github.com/JetBrains/intellij-community/commit/e4af6f96c8d4e2318d04eddf658a4c4e8c60b2e6 * `org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName` is deprecated * `org.codehaus.plexus.archiver.AbstractArchiver.addDirectory` is deprecated https://codehaus-plexus.github.io/plexus-archiver/apidocs/org/codehaus/plexus/archiver/Archiver.html#addDirectory-java.io.File-java.lang.String:A-java.lang.String:A- * Make `clean` independent from `setupMaven` * Set up JDK classpath roots explicitly because of https://github.com/JetBrains/kotlin/commit/f89765eb33dd95c8de33a919cca83651b326b246 * Add JPS model and faxml dependencies * Fix test * Exclude compiler from buildscript in integration test * Exclude `com.intellij` package from compiler * Update kotlin version in integration tests
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt1
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt7
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/PsiInheritance.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/PsiCommentsUtils.kt2
7 files changed, 9 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt
index c5b0f221..49ddd0a5 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt
@@ -2,7 +2,6 @@ package org.jetbrains.dokka.base.transformers.pages.samples
import com.intellij.psi.PsiElement
import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.kotlin.idea.kdoc.resolveKDocSampleLink
import org.jetbrains.kotlin.psi.KtBlockExpression
import org.jetbrains.kotlin.psi.KtDeclarationWithBody
import org.jetbrains.kotlin.psi.KtFile
diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
index db133bb8..9c78972a 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt
@@ -18,7 +18,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.querySingle
import org.jetbrains.dokka.transformers.pages.PageTransformer
-import org.jetbrains.kotlin.idea.kdoc.resolveKDocSampleLink
+import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
@@ -55,7 +55,7 @@ abstract class SamplesTransformer(val context: DokkaContext) : PageTransformer {
.querySingle { kotlinAnalysis }[sourceSet] // from sourceSet.sourceRoots
else AnalysisEnvironment(DokkaMessageCollector(context.logger), sourceSet.analysisPlatform).run {
if (analysisPlatform == Platform.jvm) {
- addClasspath(PathUtil.getJdkClassesRootsFromCurrentJre())
+ configureJdkClasspathRoots()
}
sourceSet.classpath.forEach(::addClasspath)
@@ -124,10 +124,11 @@ abstract class SamplesTransformer(val context: DokkaContext) : PageTransformer {
val packageName = functionName.takeWhile { it != '.' }
val descriptor = resolutionFacade.resolveSession.getPackageFragment(FqName(packageName))
?: return null.also { context.logger.warn("Cannot find descriptor for package $packageName") }
- val symbol = resolveKDocSampleLink(
+ val symbol = resolveKDocLink(
BindingContext.EMPTY,
resolutionFacade,
descriptor,
+ null,
functionName.split(".")
).firstOrNull() ?: return null.also { context.logger.warn("Unresolved function $functionName in @sample") }
return DescriptorToSourceUtils.descriptorToDeclaration(symbol)
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 6c4d7a0d..57c5fe18 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -587,7 +587,7 @@ private class DokkaDescriptorVisitor(
parameter(index, desc, DRIWithPlatformInfo(dri, actual))
},
sources = actual,
- expectPresentInSet = sourceSet.takeIf { isExpect },
+ expectPresentInSet = if(isExpect) sourceSet else null,
visibility = descriptor.visibility.toDokkaVisibility().toSourceSetDependent(),
documentation = descriptor.resolveDescriptorData().let { sourceSetDependent ->
if (descriptor.isPrimary) {
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 5b30543e..c20073a4 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -39,7 +39,7 @@ import org.jetbrains.dokka.utilities.parallelMapNotNull
import org.jetbrains.kotlin.asJava.elements.KtLightAbstractAnnotation
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot
-import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
+import org.jetbrains.kotlin.idea.base.utils.fqname.getKotlinFqName
import org.jetbrains.kotlin.load.java.JvmAbi
import org.jetbrains.kotlin.load.java.propertyNameByGetMethodName
import org.jetbrains.kotlin.load.java.propertyNamesBySetMethodName
diff --git a/plugins/base/src/main/kotlin/translators/psi/PsiInheritance.kt b/plugins/base/src/main/kotlin/translators/psi/PsiInheritance.kt
index dcfbb8e3..1eca489e 100644
--- a/plugins/base/src/main/kotlin/translators/psi/PsiInheritance.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/PsiInheritance.kt
@@ -3,7 +3,7 @@ package org.jetbrains.dokka.base.translators.psi
import com.intellij.psi.PsiClass
import com.intellij.psi.PsiMethod
import org.jetbrains.dokka.utilities.DokkaLogger
-import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
+import org.jetbrains.kotlin.idea.base.utils.fqname.getKotlinFqName
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
index a228e95a..ce0d2ff3 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
@@ -19,7 +19,7 @@ import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.dokka.utilities.enumValueOrNull
import org.jetbrains.dokka.utilities.htmlEscape
import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink
-import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
+import org.jetbrains.kotlin.idea.base.utils.fqname.getKotlinFqName
import org.jetbrains.kotlin.idea.util.CommentSaver.Companion.tokenType
import org.jetbrains.kotlin.psi.psiUtil.getNextSiblingIgnoringWhitespace
import org.jetbrains.kotlin.psi.psiUtil.siblings
diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/PsiCommentsUtils.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/PsiCommentsUtils.kt
index 1d905e2d..c4c8cbb2 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/PsiCommentsUtils.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/PsiCommentsUtils.kt
@@ -9,7 +9,7 @@ import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.idea.kdoc.findKDoc
-import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
+import org.jetbrains.kotlin.idea.base.utils.fqname.getKotlinFqName
import org.jetbrains.kotlin.idea.search.usagesSearch.descriptor
import org.jetbrains.kotlin.kdoc.psi.impl.KDocTag
import org.jetbrains.kotlin.psi.KtDeclaration