From 3be4dd94e3af2e749969ba352482eae6957cac5a Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Wed, 25 Oct 2023 14:44:09 +0300 Subject: [K2] Reorganize project model for MPP (#3236) * Reorganize project model for MPP We map Dokka's source set directly to a source module of Analysis API inside one Analysis Standalone session. Analysis API session is created in src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt (see fun createAnalysisSession) Before the PR, one Dokka's source set corresponded to one Standalone API session with one source module that has source roots from dependent source sets. * Add 'caffeine' dependency from Analysis API * Fix sample provider * Fix tests * Enable tests and update the version of Analysis API. The PR allows the enabling of some tests annotated with OnlyDescriptorsMPP. Also, tests with OnlyDescriptorsMPP that have unresolved common symbols are fixed by the new version of Analysis API. --- subprojects/analysis-kotlin-symbols/build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'subprojects/analysis-kotlin-symbols/build.gradle.kts') diff --git a/subprojects/analysis-kotlin-symbols/build.gradle.kts b/subprojects/analysis-kotlin-symbols/build.gradle.kts index 6733b778..b6626f92 100644 --- a/subprojects/analysis-kotlin-symbols/build.gradle.kts +++ b/subprojects/analysis-kotlin-symbols/build.gradle.kts @@ -72,6 +72,9 @@ dependencies { isTransitive = false // see KTIJ-19820 } } + // copy-pasted from Analysis API https://github.com/JetBrains/kotlin/blob/a10042f9099e20a656dec3ecf1665eea340a3633/analysis/low-level-api-fir/build.gradle.kts#L37 + runtimeOnly("com.github.ben-manes.caffeine:caffeine:2.9.3") + runtimeOnly(libs.kotlinx.collections.immutable) implementation(libs.kotlin.compiler.k2) { isTransitive = false @@ -79,6 +82,7 @@ dependencies { // TODO [beresnev] get rid of it compileOnly(libs.kotlinx.coroutines.core) + } tasks { -- cgit