aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2023-11-01 18:46:55 +0200
committerGitHub <noreply@github.com>2023-11-01 18:46:55 +0200
commit2b0a63f3565f620f7212a822aee2575a46f44897 (patch)
tree3ed57f682e309657c71c98ebeddf00e3ce492c61
parent7951aff0650b4c50b82a987ba4f23879f18c9436 (diff)
downloaddokka-2b0a63f3565f620f7212a822aee2575a46f44897.tar.gz
dokka-2b0a63f3565f620f7212a822aee2575a46f44897.tar.bz2
dokka-2b0a63f3565f620f7212a822aee2575a46f44897.zip
Update Kotlin compiler and KGP to 1.9.20-RC2 (#3262)
* Update Kotlin compiler to 1.9.20-RC2 The current changes are related to https://github.com/JetBrains/kotlin/commit/d797505f06d640b666829bbfb4b7d7c67f812026 * Update KGP to 1.9.20-RC2 * Replace common stdlib in unit tests * Update Kotlin version in integration tests * Fix `Multiplatform0GradleIntegrationTest` * Turn WasmGradleIntegrationTest off for Kotlin 1.9.20-RC2
-rw-r--r--core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt11
-rw-r--r--gradle/libs.versions.toml4
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts2
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/gradle.properties4
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt14
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt5
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt3
-rw-r--r--integration-tests/maven/projects/it-maven/pom.xml2
-rw-r--r--subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt1
-rw-r--r--subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt7
10 files changed, 29 insertions, 24 deletions
diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt b/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt
index 0958ea14..1f7ee060 100644
--- a/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt
@@ -191,12 +191,11 @@ public abstract class AbstractTest<M : TestMethods, T : TestBuilder<M>, D : Dokk
?.replaceAfter(".jar", "")
}
- protected val commonStdlibPath: String? by lazy {
- // TODO: feels hacky, find a better way to do it
- ClassLoader.getSystemResource("kotlin/UInt.kotlin_metadata")
- ?.file
- ?.replace("file:", "")
- ?.replaceAfter(".jar", "")
+ protected val commonStdlibPath: String? by lazy {
+ // `kotlin-stdlib-common` is legacy
+ // we can use any platform dependency
+ // since common code should be resolved with all platform
+ jvmStdlibPath
}
protected val stdlibExternalDocumentationLink: ExternalDocumentationLinkImpl = ExternalDocumentationLinkImpl(
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index e3f190fb..034c09cb 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,6 +1,6 @@
[versions]
-gradlePlugin-kotlin = "1.9.10"
+gradlePlugin-kotlin = "1.9.20-RC2"
# See: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin
gradlePlugin-android = "4.2.2"
gradlePlugin-dokka = "1.9.10"
@@ -10,7 +10,7 @@ kotlinx-collections-immutable = "0.3.6"
kotlinx-bcv = "0.13.2"
## Analysis
-kotlin-compiler = "1.9.10"
+kotlin-compiler = "1.9.20-RC2"
kotlin-compiler-k2 = "2.0.0-dev-5387"
# MUST match the version of the intellij platform used in the kotlin compiler,
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts b/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
index ab7a8fb5..a00b4b8d 100644
--- a/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
+++ b/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
jvm()
linuxX64("linux")
macosX64("macos")
- js(BOTH)
+ js(IR) // Starting with Kotlin 1.9.0, using compiler types LEGACY or BOTH leads to an error.
//TODO Add wasm when kx.coroutines will be supported and published into the main repo
sourceSets {
val commonMain by sourceSets.getting
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/gradle.properties b/integration-tests/gradle/projects/it-multiplatform-0/gradle.properties
index 4d8f2847..1e2686ef 100644
--- a/integration-tests/gradle/projects/it-multiplatform-0/gradle.properties
+++ b/integration-tests/gradle/projects/it-multiplatform-0/gradle.properties
@@ -3,7 +3,3 @@
#
dokka_it_kotlin_version=1.9.10
-#these flags are enabled by default since 1.6.20.
-#remove when this test is executed with Kotlin >= 1.6.20
-kotlin.mpp.enableGranularSourceSetsMetadata=true
-kotlin.native.enableDependencyPropagation=false
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
index e43bc059..d8f5cee2 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
@@ -27,7 +27,19 @@ class Multiplatform0GradleIntegrationTest : AbstractGradleIntegrationTest() {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(AllSupportedTestedVersionsArgumentsProvider::class)
fun execute(buildVersions: BuildVersions) {
- val result = createGradleRunner(buildVersions, "dokkaHtml", "-i", "-s").buildRelaxed()
+ // `enableGranularSourceSetsMetadata` and `enableDependencyPropagation` flags are enabled by default since 1.6.20.
+ // remove when this test is executed with Kotlin >= 1.6.20
+ val result = if (buildVersions.kotlinVersion < "1.6.20")
+ createGradleRunner(
+ buildVersions,
+ "dokkaHtml",
+ "-i",
+ "-s",
+ "-Pkotlin.mpp.enableGranularSourceSetsMetadata=true",
+ "-Pkotlin.native.enableDependencyPropagation=false"
+ ).buildRelaxed()
+ else
+ createGradleRunner(buildVersions, "dokkaHtml", "-i", "-s").buildRelaxed()
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtml")).outcome)
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 3493879a..e4634c09 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
@@ -14,7 +14,7 @@ internal open class AllSupportedTestedVersionsArgumentsProvider : TestedVersions
internal object TestedVersions {
- val LATEST = BuildVersions("7.6.2", "1.9.10")
+ val LATEST = BuildVersions("7.6.2", "1.9.20-RC2")
/**
* All supported Gradle/Kotlin versions, including [LATEST]
@@ -24,7 +24,7 @@ internal object TestedVersions {
val ALL_SUPPORTED =
BuildVersions.permutations(
gradleVersions = listOf("7.6.2"),
- kotlinVersions = listOf("1.9.0", "1.8.20", "1.7.20", "1.6.21", "1.5.31"),
+ kotlinVersions = listOf("1.9.10", "1.8.20", "1.7.20", "1.6.21", "1.5.31"),
) + BuildVersions.permutations(
gradleVersions = listOf(*ifExhaustive("7.0", "6.1.1")),
kotlinVersions = listOf(*ifExhaustive( "1.8.0", "1.7.0", "1.6.0", "1.5.0"))
@@ -61,6 +61,7 @@ internal object TestedVersions {
"1.8.20" to "18.2.0-pre.546",
"1.9.0" to "18.2.0-pre.597",
"1.9.10" to "18.2.0-pre.597",
+ "1.9.20-RC2" to "18.2.0-pre.635",
)
}
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt
index aa3a2278..4280459c 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt
@@ -20,7 +20,8 @@ internal class WasmTestedVersionsArgumentsProvider : AllSupportedTestedVersionsA
override fun provideArguments(context: ExtensionContext?): Stream<out Arguments> {
return super.provideArguments(context).filter {
val buildVersions = it.get().single() as BuildVersions
- buildVersions.kotlinVersion >= "1.8.20" // 1.8.20 is the first public version that can be tested with wasm
+ buildVersions.kotlinVersion >= "1.8.20" && // 1.8.20 is the first public version that can be tested with wasm
+ buildVersions.kotlinVersion <= "1.9.10"// in 1.9.20 wasm target was split into `wasm-js` and `wasm-wasi`
}
}
}
diff --git a/integration-tests/maven/projects/it-maven/pom.xml b/integration-tests/maven/projects/it-maven/pom.xml
index c426fb36..3e20bf53 100644
--- a/integration-tests/maven/projects/it-maven/pom.xml
+++ b/integration-tests/maven/projects/it-maven/pom.xml
@@ -11,7 +11,7 @@
<version>1.0-SNAPSHOT</version>
<properties>
- <kotlin.version>1.9.10</kotlin.version>
+ <kotlin.version>1.9.20-RC</kotlin.version>
</properties>
<build>
<plugins>
diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt
index 6957bcbf..98f9c64a 100644
--- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt
+++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt
@@ -44,7 +44,6 @@ internal class DokkaJsResolverForModuleFactory(
metadataFactories.DefaultDescriptorFactory,
metadataFactories.DefaultPackageFragmentsFactory,
metadataFactories.flexibleTypeDeserializer,
- metadataFactories.platformDependentTypeTransformer
)
}
diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt
index 80166830..09f4e48a 100644
--- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt
+++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt
@@ -16,7 +16,6 @@ import org.jetbrains.kotlin.library.metadata.DeserializedKlibModuleOrigin
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.library.metadata.KlibMetadataFactories
import org.jetbrains.kotlin.library.KotlinLibrary
-import org.jetbrains.kotlin.library.metadata.NativeTypeTransformer
import org.jetbrains.kotlin.library.metadata.NullFlexibleTypeDeserializer
import org.jetbrains.kotlin.library.metadata.parseModuleHeader
import org.jetbrains.kotlin.name.Name
@@ -107,8 +106,7 @@ internal class DokkaKlibMetadataCommonDependencyContainer(
KlibMetadataModuleDescriptorFactoryImpl(
MetadataFactories.DefaultDescriptorFactory,
MetadataFactories.DefaultPackageFragmentsFactory,
- MetadataFactories.flexibleTypeDeserializer,
- MetadataFactories.platformDependentTypeTransformer
+ MetadataFactories.flexibleTypeDeserializer
)
}
@@ -138,6 +136,5 @@ internal class DokkaKlibMetadataCommonDependencyContainer(
private val MetadataFactories =
KlibMetadataFactories(
{ DefaultBuiltIns.Instance },
- NullFlexibleTypeDeserializer,
- NativeTypeTransformer()
+ NullFlexibleTypeDeserializer
)