aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gradle.properties6
-rw-r--r--integration-tests/gradle/projects/it-basic/build.gradle.kts4
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt2
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt2
-rw-r--r--kotlin-analysis/compiler-dependency/build.gradle.kts2
-rw-r--r--kotlin-analysis/intellij-dependency/build.gradle.kts12
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt2
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreKotlinCacheService.kt4
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt2
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/JvmDependenciesIndexImpl.kt1
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinCliJavaFileManagerImpl.kt5
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/TypeReferenceFactory.kt16
-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
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt10
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt2
-rw-r--r--runners/maven-plugin/build.gradle.kts7
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt3
23 files changed, 65 insertions, 33 deletions
diff --git a/gradle.properties b/gradle.properties
index c093589f..7834dd47 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,12 +2,12 @@
dokka_version=1.7.0-SNAPSHOT
dokka_integration_test_parallelism=2
# Versions
-kotlin_version=1.6.21
+kotlin_version=1.7.0-RC
coroutines_version=1.6.0
kotlinx_html_version=0.7.3
-kotlin_plugin_version=211-1.6.21-release-334-IJ7442.40
+kotlin_plugin_version=213-1.7.0-RC-release-217-IJ6777.52
jsoup_version=1.14.3
-idea_version=211.7442.40
+idea_version=213.6777.52
language_version=1.4
jackson_version=2.12.4
freemarker_version=2.3.31
diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts
index b2a84e5f..3f7dd32b 100644
--- a/integration-tests/gradle/projects/it-basic/build.gradle.kts
+++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts
@@ -12,7 +12,9 @@ plugins {
buildscript {
dependencies {
- classpath("org.jetbrains.dokka:dokka-base:${System.getenv("DOKKA_VERSION")}")
+ classpath("org.jetbrains.dokka:dokka-base:${System.getenv("DOKKA_VERSION")}") {
+ exclude(group = "org.jetbrains.dokka", module = "dokka-analysis") // Gradle has embeddable Kotlin compiler
+ }
}
}
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt
index ef9d67cc..cef9fd8b 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt
@@ -18,7 +18,7 @@ class JsIRGradleIntegrationTest(override val versions: BuildVersions) : Abstract
// some core react classes were moved from `react-router-dom` to `react` artifacts.
// Writing an integration test project that would work for both 1.4.0 and 1.5.0 would involve
// ugly solutions, so these versions are ignored. Not a big loss given they are deprecated as of this moment.
- "1.4.0", "1.4.32"
+ "1.4.0", "1.4.32", "1.7.0-RC"
)
@BeforeTest
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt
index b87707a4..7f2ad851 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt
@@ -5,7 +5,7 @@ internal object TestedVersions {
val BASE =
BuildVersions.permutations(
gradleVersions = listOf("7.4.2", "6.9"),
- kotlinVersions = listOf("1.6.21", "1.5.31", "1.4.32"),
+ kotlinVersions = listOf("1.7.0-RC", "1.6.21", "1.5.31", "1.4.32"),
) + BuildVersions.permutations(
gradleVersions = listOf(*ifExhaustive("7.0", "6.1.1")),
kotlinVersions = listOf(*ifExhaustive("1.6.0", "1.5.0", "1.4.0"))
diff --git a/kotlin-analysis/compiler-dependency/build.gradle.kts b/kotlin-analysis/compiler-dependency/build.gradle.kts
index 779fbfd2..63e0fb5a 100644
--- a/kotlin-analysis/compiler-dependency/build.gradle.kts
+++ b/kotlin-analysis/compiler-dependency/build.gradle.kts
@@ -16,7 +16,7 @@ tasks {
val dokka_version: String by project
archiveFileName.set("dokka-kotlin-analysis-compiler-$dokka_version.jar")
archiveClassifier.set("")
- exclude("**/intellij**")
+ exclude("com/intellij/")
}
}
diff --git a/kotlin-analysis/intellij-dependency/build.gradle.kts b/kotlin-analysis/intellij-dependency/build.gradle.kts
index b2ee35e1..09c47ef5 100644
--- a/kotlin-analysis/intellij-dependency/build.gradle.kts
+++ b/kotlin-analysis/intellij-dependency/build.gradle.kts
@@ -19,7 +19,14 @@ repositories {
val intellijCore: Configuration by configurations.creating
fun intellijCoreAnalysis() = zipTree(intellijCore.singleFile).matching {
- include("intellij-core-analysis-deprecated.jar")
+ include("intellij-core.jar")
+}
+
+val jpsStandalone: Configuration by configurations.creating
+
+fun jpsModel() = zipTree(jpsStandalone.singleFile).matching {
+ include("jps-model.jar")
+ include("aalto-xml-*.jar")
}
dependencies {
@@ -34,6 +41,9 @@ dependencies {
val idea_version: String by project
intellijCore("com.jetbrains.intellij.idea:intellij-core:$idea_version")
implementation(intellijCoreAnalysis())
+
+ jpsStandalone("com.jetbrains.intellij.idea:jps-standalone:$idea_version")
+ implementation(jpsModel())
}
tasks {
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
index 48162097..9efa66fb 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
@@ -542,6 +542,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
}
}
+ // Set up JDK classpath roots explicitly because of https://github.com/JetBrains/kotlin/commit/f89765eb33dd95c8de33a919cca83651b326b246
+ fun configureJdkClasspathRoots() = configuration.configureJdkClasspathRoots()
/**
* Adds path to classpath.
* $path: path to add
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreKotlinCacheService.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreKotlinCacheService.kt
index 12cc3351..e2cd328a 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreKotlinCacheService.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreKotlinCacheService.kt
@@ -15,6 +15,10 @@ class CoreKotlinCacheService(private val resolutionFacade: DokkaResolutionFacade
return resolutionFacade
}
+ override fun getResolutionFacade(element: KtElement): ResolutionFacade {
+ return resolutionFacade
+ }
+
override fun getResolutionFacadeByFile(
file: PsiFile,
platform: org.jetbrains.kotlin.platform.TargetPlatform
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt
index 90958ff3..60ad3315 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt
@@ -17,7 +17,7 @@ internal fun createEnvironmentAndFacade(
): EnvironmentAndFacade =
AnalysisEnvironment(DokkaMessageCollector(logger), sourceSet.analysisPlatform).run {
if (analysisPlatform == Platform.jvm) {
- addClasspath(PathUtil.getJdkClassesRootsFromCurrentJre())
+ configureJdkClasspathRoots()
}
val parentSourceSets = sourceSets.filter { it.sourceSetID in sourceSet.dependentSourceSets }
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/JvmDependenciesIndexImpl.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/JvmDependenciesIndexImpl.kt
index c64f2fab..1075665e 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/JvmDependenciesIndexImpl.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/JvmDependenciesIndexImpl.kt
@@ -209,6 +209,7 @@ class JvmDependenciesIndexImpl(_roots: List<JavaRoot>) : JvmDependenciesIndex {
val fileExtension = when (rootType) {
JavaRoot.RootType.BINARY -> JavaClassFileType.INSTANCE.defaultExtension
+ JavaRoot.RootType.BINARY_SIG -> "sig"
JavaRoot.RootType.SOURCE -> JavaFileType.INSTANCE.defaultExtension
}
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinCliJavaFileManagerImpl.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinCliJavaFileManagerImpl.kt
index 5955c3e4..37a5e3f7 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinCliJavaFileManagerImpl.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinCliJavaFileManagerImpl.kt
@@ -90,7 +90,7 @@ class KotlinCliJavaFileManagerImpl(private val myPsiManager: PsiManager) : CoreJ
val (classId, classFileContentFromRequest, outerClassFromRequest) = request
val virtualFile = findVirtualFileForTopLevelClass(classId, searchScope) ?: return null
- if (!usePsiClassFilesReading && virtualFile.extension == "class") {
+ if (!usePsiClassFilesReading && (virtualFile.extension == "class" || virtualFile.extension == "sig")) {
synchronized(binaryCache){
// We return all class files' names in the directory in knownClassNamesInPackage method, so one may request an inner class
return binaryCache.getOrPut(classId) {
@@ -215,6 +215,7 @@ class KotlinCliJavaFileManagerImpl(private val myPsiManager: PsiManager) : CoreJ
val vFile = when (rootType) {
JavaRoot.RootType.BINARY -> packageDir.findChild("$topLevelClassName.class")
+ JavaRoot.RootType.BINARY_SIG -> packageDir.findChild("$topLevelClassName.sig")
JavaRoot.RootType.SOURCE -> packageDir.findChild("$topLevelClassName.java")
} ?: return null
@@ -235,7 +236,7 @@ class KotlinCliJavaFileManagerImpl(private val myPsiManager: PsiManager) : CoreJ
val result = THashSet<String>()
index.traverseDirectoriesInPackage(packageFqName, continueSearch = { dir, _ ->
for (child in dir.children) {
- if (child.extension == "class" || child.extension == "java") {
+ if (child.extension == "class" || child.extension == "java" || child.extension == "sig") {
result.add(child.nameWithoutExtension)
}
}
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/TypeReferenceFactory.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/TypeReferenceFactory.kt
index 22660ecc..091e54ce 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/TypeReferenceFactory.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/TypeReferenceFactory.kt
@@ -9,7 +9,9 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
import org.jetbrains.kotlin.resolve.scopes.receivers.ExtensionReceiver
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.TypeProjection
-import org.jetbrains.kotlin.types.UnresolvedType
+import org.jetbrains.kotlin.types.error.ErrorType
+import org.jetbrains.kotlin.types.error.ErrorTypeConstructor
+import org.jetbrains.kotlin.types.error.ErrorTypeKind
fun TypeReference.Companion.from(d: ReceiverParameterDescriptor): TypeReference? =
when (d.value) {
@@ -35,10 +37,14 @@ private fun TypeReference.Companion.fromPossiblyRecursive(t: KotlinType, paramTr
?: from(t, paramTrace)
private fun TypeReference.Companion.from(t: KotlinType, paramTrace: List<KotlinType>): TypeReference {
- if (t is UnresolvedType) {
- return TypeConstructor(
- t.presentableName, t.arguments.map { fromProjection(it, paramTrace) }
- )
+ if (t is ErrorType) {
+ val errorConstructor = t.constructor as? ErrorTypeConstructor
+ val presentableName =
+ if (errorConstructor?.kind == ErrorTypeKind.UNRESOLVED_TYPE && errorConstructor.parameters.isNotEmpty())
+ errorConstructor.getParam(0)
+ else
+ t.constructor.toString()
+ return TypeConstructor(presentableName, t.arguments.map { fromProjection(it, paramTrace) })
}
return when (val d = t.constructor.declarationDescriptor) {
is TypeParameterDescriptor -> TypeParam(
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
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
index 22348ce1..abb963a6 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
@@ -126,7 +126,7 @@ internal class JavadocIndexTest : AbstractJavadocTemplateMapTest() {
class Clazz {
fun funName(param: List<String>) {}
fun funName(param: String) {}
- fun funName(param: Map<String>) {}
+ fun funName(param: Map<String, String>>) {}
fun funName(param: Int) {}
}
""".trimIndent()
@@ -144,10 +144,10 @@ internal class JavadocIndexTest : AbstractJavadocTemplateMapTest() {
assertEquals(1, it.callable!!.params.size)
}
- assertEquals("[kotlin.String]", indexElementDRIs[0].getParam(0))
- assertEquals("kotlin.Int", indexElementDRIs[1].getParam(0))
- assertEquals("kotlin.String", indexElementDRIs[2].getParam(0))
- assertEquals("kotlin.collections.List[kotlin.String]", indexElementDRIs[3].getParam(0))
+ assertEquals("kotlin.Int", indexElementDRIs[0].getParam(0))
+ assertEquals("kotlin.String", indexElementDRIs[1].getParam(0))
+ assertEquals("kotlin.collections.List[kotlin.String]", indexElementDRIs[2].getParam(0))
+ assertEquals("kotlin.collections.Map[kotlin.String,kotlin.String]", indexElementDRIs[3].getParam(0))
}
}
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt
index 2770153d..1d0fa4a3 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt
@@ -25,6 +25,7 @@ internal fun Project.classpathOf(sourceSet: KotlinSourceSet): FileCollection {
private fun Project.compileClasspathOf(compilation: KotlinCompilation): FileCollection {
if (compilation.target.isAndroidTarget()) {
// This is a workaround for https://youtrack.jetbrains.com/issue/KT-33893
+ @Suppress("DEPRECATION") // for compatibility
return compilation.compileKotlinTask.cast<KotlinCompile>().classpath
}
@@ -34,5 +35,6 @@ private fun Project.compileClasspathOf(compilation: KotlinCompilation): FileColl
?: files()
return compilation.compileDependencyFiles + platformDependencyFiles +
+ @Suppress("DEPRECATION") // for compatibility
(compilation.compileKotlinTask.run { this as? KotlinCompile }?.classpath ?: files())
}
diff --git a/runners/maven-plugin/build.gradle.kts b/runners/maven-plugin/build.gradle.kts
index 7b3bc649..d62b82dd 100644
--- a/runners/maven-plugin/build.gradle.kts
+++ b/runners/maven-plugin/build.gradle.kts
@@ -13,9 +13,12 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
}
+val mavenBuildDir = setupMaven.mavenBuildDir
+val mavenBinDir = setupMaven.mavenBinDir
+
tasks.named<Delete>("clean") {
- delete(setupMaven.mavenBuildDir)
- delete(setupMaven.mavenBinDir)
+ delete(mavenBuildDir)
+ delete(mavenBinDir)
}
/**
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index 94eacdb5..64cf8ee2 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -17,6 +17,7 @@ import org.apache.maven.project.MavenProjectHelper
import org.apache.maven.repository.RepositorySystem
import org.codehaus.plexus.archiver.Archiver
import org.codehaus.plexus.archiver.jar.JarArchiver
+import org.codehaus.plexus.archiver.util.DefaultFileSet
import org.codehaus.plexus.util.xml.Xpp3Dom
import org.jetbrains.dokka.*
import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink
@@ -404,7 +405,7 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo(listOf(javadocDependency)) {
val archiver = MavenArchiver()
archiver.archiver = jarArchiver
archiver.setOutputFile(javadocJar)
- archiver.archiver.addDirectory(File(outputDir), arrayOf("**/**"), arrayOf())
+ archiver.archiver.addFileSet(DefaultFileSet().apply { directory = File(outputDir) })
archive.isAddMavenDescriptor = false
archiver.createArchive(session, mavenProject, archive)