From 034af78b0f10491c82d325a2da2bd2955fcdc78e Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 26 Mar 2020 01:19:52 +0300 Subject: [PATCH] Fix mass build-failure because of bad dependencies in :compiler:visualizer module Rename raw-fir:common to raw-fir:common -> raw-fir:fir-common. If there's dependency both on :compiler:visualizer:common and :compiler:fir:raw-fir:common, only one of artifact is left in classpath --- build.gradle.kts | 2 +- .../raw-fir/{common => fir-common}/build.gradle.kts | 0 .../jetbrains/kotlin/fir/builder/BaseFirBuilder.kt | 0 .../src/org/jetbrains/kotlin/fir/builder/Context.kt | 0 .../jetbrains/kotlin/fir/builder/ConversionUtils.kt | 0 compiler/fir/raw-fir/light-tree2fir/build.gradle.kts | 2 +- compiler/fir/raw-fir/psi2fir/build.gradle.kts | 2 +- compiler/visualizer/build.gradle.kts | 11 +++++------ settings.gradle | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) rename compiler/fir/raw-fir/{common => fir-common}/build.gradle.kts (100%) rename compiler/fir/raw-fir/{common => fir-common}/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt (100%) rename compiler/fir/raw-fir/{common => fir-common}/src/org/jetbrains/kotlin/fir/builder/Context.kt (100%) rename compiler/fir/raw-fir/{common => fir-common}/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt (100%) diff --git a/build.gradle.kts b/build.gradle.kts index ad4aabf4668..9250d6795cc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -256,7 +256,7 @@ extra["compilerModules"] = arrayOf( ":compiler:fir:cones", ":compiler:fir:resolve", ":compiler:fir:tree", - ":compiler:fir:raw-fir:common", + ":compiler:fir:raw-fir:fir-common", ":compiler:fir:raw-fir:psi2fir", ":compiler:fir:raw-fir:light-tree2fir", ":compiler:fir:fir2ir", diff --git a/compiler/fir/raw-fir/common/build.gradle.kts b/compiler/fir/raw-fir/fir-common/build.gradle.kts similarity index 100% rename from compiler/fir/raw-fir/common/build.gradle.kts rename to compiler/fir/raw-fir/fir-common/build.gradle.kts diff --git a/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt similarity index 100% rename from compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt rename to compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt diff --git a/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/Context.kt b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/Context.kt similarity index 100% rename from compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/Context.kt rename to compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/Context.kt diff --git a/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt similarity index 100% rename from compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt rename to compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt diff --git a/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts index 2cdc8b7e9e0..72820b94f3e 100644 --- a/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts +++ b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts @@ -15,7 +15,7 @@ repositories { } dependencies { - compile(project(":compiler:fir:raw-fir:common")) + compile(project(":compiler:fir:raw-fir:fir-common")) compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } diff --git a/compiler/fir/raw-fir/psi2fir/build.gradle.kts b/compiler/fir/raw-fir/psi2fir/build.gradle.kts index 7d9f8d7b331..62d8d21d25e 100644 --- a/compiler/fir/raw-fir/psi2fir/build.gradle.kts +++ b/compiler/fir/raw-fir/psi2fir/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } dependencies { - compile(project(":compiler:fir:raw-fir:common")) + compile(project(":compiler:fir:raw-fir:fir-common")) compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } diff --git a/compiler/visualizer/build.gradle.kts b/compiler/visualizer/build.gradle.kts index 96207118d0b..8cc0b7898b1 100644 --- a/compiler/visualizer/build.gradle.kts +++ b/compiler/visualizer/build.gradle.kts @@ -7,15 +7,14 @@ dependencies { testRuntime(intellijDep()) testCompile(intellijCoreDep()) { includeJars("intellij-core") } - testCompile(project(":compiler:fir:raw-fir:psi2fir")) - testCompile(project(":compiler:visualizer:render-psi")) - testCompile(project(":compiler:visualizer:render-fir")) - testCompile(project(":compiler:visualizer:common")) - + testCompileOnly(project(":compiler:fir:raw-fir:psi2fir")) + + testCompileOnly(project(":compiler:visualizer:render-psi")) + testCompileOnly(project(":compiler:visualizer:render-fir")) + testCompile(commonDep("junit:junit")) testCompile(projectTests(":compiler:tests-common")) testCompile(projectTests(":compiler:fir:analysis-tests")) - } sourceSets { diff --git a/settings.gradle b/settings.gradle index 3080203463f..c07e416b78c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -80,7 +80,7 @@ include ":kotlin-build-common", ":compiler:fir:cones", ":compiler:fir:tree", ":compiler:fir:tree:tree-generator", - ":compiler:fir:raw-fir:common", + ":compiler:fir:raw-fir:fir-common", ":compiler:fir:raw-fir:psi2fir", ":compiler:fir:raw-fir:light-tree2fir", ":compiler:fir:fir2ir",