From b6dce5370b0c90932127499a903453b199e69c5a Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 22 Jul 2021 14:27:55 +0200 Subject: Bump kotlin 1.5.21 (#2031) * bump kotlin to 1.5.21 * Bump binary compatibility plugin * update stdlib submodule * Bump IJ to 202.8194.7 --- buildSrc/build.gradle.kts | 2 +- gradle.properties | 10 +++++----- .../gradle/projects/stdlib/kotlin-dokka-stdlib | 2 +- kotlin-analysis/intellij-dependency/build.gradle.kts | 1 + .../org/jetbrains/dokka/analysis/AnalysisEnvironment.kt | 13 +++++++++---- .../pages/samples/KotlinWebsiteSamplesTransformer.kt | 2 +- .../dokka/javadoc/signatures/JavadocSignatureProvider.kt | 8 ++++---- .../src/main/kotlin/signatures/JavaSignatureProvider.kt | 3 ++- 8 files changed, 24 insertions(+), 17 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1f1faaab..7234f33f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -9,6 +9,6 @@ repositories { dependencies { implementation("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4") implementation("com.github.jengelman.gradle.plugins:shadow:2.0.4") - implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.4.0") + implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.6.0") implementation("io.github.gradle-nexus:publish-plugin:1.0.0") } diff --git a/gradle.properties b/gradle.properties index 009637c6..601f3777 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,14 @@ # Project Settings -dokka_version_base=1.5.20 +dokka_version_base=1.5.21 dokka_publication_channels=maven-central-snapshot&space-dokka-dev dokka_integration_test_parallelism=2 # Versions -kotlin_version=1.5.0 -coroutines_version=1.5.0 +kotlin_version=1.5.21 +coroutines_version=1.5.1 kotlinx_html_version=0.7.3 -kotlin_plugin_version=202-1.5.0-release-755-release-IJ8194.7 +kotlin_plugin_version=202-1.5.21-release-321-IJ8194.7 jsoup_version=1.13.1 -idea_version=202.7660.26 +idea_version=202.8194.7 language_version=1.4 jackson_version=2.12.4 # Code style diff --git a/integration-tests/gradle/projects/stdlib/kotlin-dokka-stdlib b/integration-tests/gradle/projects/stdlib/kotlin-dokka-stdlib index 10ed102f..43789886 160000 --- a/integration-tests/gradle/projects/stdlib/kotlin-dokka-stdlib +++ b/integration-tests/gradle/projects/stdlib/kotlin-dokka-stdlib @@ -1 +1 @@ -Subproject commit 10ed102f01ee37f3bacbe86171afec06898dad58 +Subproject commit 437898864a43a0d13b13bda2c04aa6de8231f54b diff --git a/kotlin-analysis/intellij-dependency/build.gradle.kts b/kotlin-analysis/intellij-dependency/build.gradle.kts index 7df4f676..5993c4d8 100644 --- a/kotlin-analysis/intellij-dependency/build.gradle.kts +++ b/kotlin-analysis/intellij-dependency/build.gradle.kts @@ -14,6 +14,7 @@ repositories { maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide") maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies") maven("https://cache-redirector.jetbrains.com/intellij-dependencies") + maven("https://www.myget.org/F/rd-snapshots/maven/") } val intellijCore: Configuration by configurations.creating 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 30f1f1fb..72b29002 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 @@ -69,6 +69,7 @@ import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.platform.jvm.JvmPlatforms.unspecifiedJvmPlatform import org.jetbrains.kotlin.platform.konan.NativePlatforms import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.resolve.CliSealedClassInheritorsProvider import org.jetbrains.kotlin.resolve.CompilerEnvironment import org.jetbrains.kotlin.resolve.PlatformDependentAnalyzerServices import org.jetbrains.kotlin.resolve.jvm.JvmPlatformParameters @@ -364,7 +365,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl projectContext.withModule(descriptor), modulesContent(moduleInfo), this, - LanguageVersionSettingsImpl.DEFAULT + LanguageVersionSettingsImpl.DEFAULT, + CliSealedClassInheritorsProvider, ) override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null @@ -392,7 +394,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl projectContext.withModule(descriptor), modulesContent(moduleInfo), this, - LanguageVersionSettingsImpl.DEFAULT + LanguageVersionSettingsImpl.DEFAULT, + CliSealedClassInheritorsProvider, ) override fun builtInsForModule(module: ModuleInfo): KotlinBuiltIns = DefaultBuiltIns.Instance @@ -422,7 +425,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl projectContext.withModule(descriptor), modulesContent(moduleInfo), this, - LanguageVersionSettingsImpl.DEFAULT + LanguageVersionSettingsImpl.DEFAULT, + CliSealedClassInheritorsProvider, ) } @@ -491,7 +495,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl projectContext.withModule(descriptor), modulesContent(moduleInfo), this, - LanguageVersionSettingsImpl.DEFAULT + LanguageVersionSettingsImpl.DEFAULT, + CliSealedClassInheritorsProvider, ) override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt index c099644f..5babc289 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt @@ -178,7 +178,7 @@ class KotlinWebsiteSamplesTransformer(context: DokkaContext): SamplesTransformer override fun processBody(psiElement: PsiElement): String { val text = processSampleBody(psiElement).trim { it == '\n' || it == '\r' }.trimEnd() val lines = text.split("\n") - val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.min() ?: 0 + val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.minOrNull() ?: 0 return lines.joinToString("\n") { it.drop(indent) } } diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt index e8ec0933..4d40b347 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt @@ -95,13 +95,13 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo } private fun signature(f: DFunction): List = - javadocSignature(f) { + javadocSignature(f) { sourceSet -> annotations { annotationsBlock(f) } modifiers { - text(f.modifier[it]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ") ?: "") - text(f.modifiers()[it]?.toSignatureString() ?: "") + text(f.modifier[sourceSet]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ") ?: "") + text(f.modifiers()[sourceSet]?.toSignatureString() ?: "") val usedGenerics = if (f.isConstructor) f.generics.filter { f uses it } else f.generics list(usedGenerics, prefix = "<", suffix = "> ") { +buildSignature(it) @@ -113,7 +113,7 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo text("(") list(f.parameters) { annotationsInline(it) - text(it.modifiers()[it]?.toSignatureString().orEmpty()) + text(it.modifiers()[sourceSet]?.toSignatureString().orEmpty()) signatureForProjection(it.type) text(Typography.nbsp.toString()) text(it.name.orEmpty()) diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt index f51a9edd..58a3043c 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.kotlinAsJava.signatures +import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.signatures.JvmSignatureUtils import org.jetbrains.dokka.base.signatures.SignatureProvider @@ -137,7 +138,7 @@ class JavaSignatureProvider internal constructor(ctcc: CommentsToContentConverte text("(") list(f.parameters) { annotationsInline(it) - text(it.modifiers()[it]?.toSignatureString() ?: "") + text(it.modifiers()[sourceSet]?.toSignatureString() ?: "") signatureForProjection(it.type) text(nbsp.toString()) text(it.name!!) -- cgit