[FIR] Cleanup dependencies for fir modules

This commit is contained in:
Dmitriy Novozhilov
2020-08-28 15:27:01 +03:00
parent 73e2314f2f
commit 94d58c714a
16 changed files with 69 additions and 56 deletions
@@ -80,6 +80,8 @@ fun Project.androidDxJar() = "org.jetbrains.kotlin:android-dx:${rootProject.extr
fun Project.jpsBuildTest() = "com.jetbrains.intellij.idea:jps-build-test:${rootProject.extra["versions.intellijSdk"]}" fun Project.jpsBuildTest() = "com.jetbrains.intellij.idea:jps-build-test:${rootProject.extra["versions.intellijSdk"]}"
fun Project.kotlinxCollectionsImmutable() = "org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${rootProject.extra["versions.kotlinx-collections-immutable"]}"
/** /**
* Runtime version of annotations that are already in Kotlin stdlib (historically Kotlin has older version of this one). * Runtime version of annotations that are already in Kotlin stdlib (historically Kotlin has older version of this one).
* *
+6 -6
View File
@@ -11,14 +11,14 @@ plugins {
dependencies { dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
testCompile(intellijDep()) testApi(intellijDep())
testCompile(commonDep("junit:junit")) testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit")) testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testCompile(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testCompile(project(":compiler:fir:checkers")) testApi(project(":compiler:fir:checkers"))
testCompile(project(":compiler:frontend")) testApi(project(":compiler:frontend"))
testCompileOnly(project(":kotlin-reflect-api")) testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect")) testRuntime(project(":kotlin-reflect"))
@@ -42,4 +42,4 @@ projectTest(parallel = true) {
maxHeapSize = "3g" maxHeapSize = "3g"
} }
testsJar() testsJar()
+8 -2
View File
@@ -4,8 +4,14 @@ plugins {
} }
dependencies { dependencies {
compile(project(":compiler:fir:resolve")) api(project(":compiler:fir:resolve"))
api(project(":compiler:frontend"))
/*
* We can't remove this dependency until we use
* diagnostics framework from FE 1.0
*/
implementation(project(":compiler:frontend"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect-api")) compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
+10 -10
View File
@@ -13,23 +13,23 @@ repositories {
} }
dependencies { dependencies {
compile(project(":core:descriptors")) implementation(project(":core:descriptors"))
compile(project(":core:deserialization")) implementation(project(":core:deserialization"))
compile(project(":compiler:fir:cones")) implementation(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree")) implementation(project(":compiler:fir:tree"))
compile(project(":compiler:fir:resolve")) implementation(project(":compiler:fir:resolve"))
compile(project(":compiler:fir:java")) implementation(project(":compiler:fir:java"))
compile(project(":compiler:cli")) implementation(project(":compiler:cli"))
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
compileOnly(intellijCoreDep()) { includeJars("intellij-core") } compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("commons-lang-2.4") } compileOnly(intellijDep()) { includeJars("commons-lang-2.4") }
compile("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
} }
sourceSets { sourceSets {
"main" { projectDefault() } "main" { projectDefault() }
} }
testsJar()
testsJar()
@@ -4,13 +4,14 @@ plugins {
} }
dependencies { dependencies {
compile(project(":core:descriptors")) implementation(project(":core:descriptors"))
compile(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree"))
compile(project(":compiler:fir:resolve"))
implementation(project(":compiler:fir:fir-deserialization")) implementation(project(":compiler:fir:fir-deserialization"))
implementation(project(":core:deserialization")) implementation(project(":core:deserialization"))
api(project(":compiler:fir:cones"))
api(project(":compiler:fir:tree"))
api(project(":compiler:fir:resolve"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }
} }
+7 -6
View File
@@ -5,6 +5,7 @@ plugins {
dependencies { dependencies {
compileOnly(project(":core:descriptors")) compileOnly(project(":core:descriptors"))
compileOnly(project(":core:descriptors.jvm"))
compileOnly(project(":compiler:fir:cones")) compileOnly(project(":compiler:fir:cones"))
compileOnly(project(":compiler:fir:resolve")) compileOnly(project(":compiler:fir:resolve"))
compileOnly(project(":compiler:fir:tree")) compileOnly(project(":compiler:fir:tree"))
@@ -16,18 +17,18 @@ dependencies {
testCompileOnly(intellijDep()) testCompileOnly(intellijDep())
testRuntime(intellijDep()) testRuntimeOnly(intellijDep())
testCompile(commonDep("junit:junit")) testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit")) testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testCompile(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testCompile(projectTests(":compiler:fir:analysis-tests")) testApi(projectTests(":compiler:fir:analysis-tests"))
testApi(project(":compiler:resolution.common")) testApi(project(":compiler:resolution.common"))
testCompileOnly(project(":kotlin-reflect-api")) testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect")) testRuntimeOnly(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime")) testRuntimeOnly(project(":core:descriptors.runtime"))
Platform[192].orHigher { Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
+5 -5
View File
@@ -5,12 +5,12 @@ plugins {
} }
dependencies { dependencies {
compile(project(":compiler:frontend.common")) api(project(":compiler:frontend.common"))
compile(project(":compiler:frontend.java")) api(project(":compiler:fir:resolve"))
compile(project(":compiler:fir:resolve")) api(project(":compiler:fir:checkers"))
compile(project(":compiler:fir:checkers")) api(project(":compiler:fir:jvm"))
implementation(project(":compiler:fir:jvm"))
api(project(":compiler:fir:fir-deserialization")) api(project(":compiler:fir:fir-deserialization"))
implementation(project(":compiler:frontend.java"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") } compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
} }
+1 -4
View File
@@ -4,16 +4,13 @@ plugins {
} }
dependencies { dependencies {
implementation(project(":compiler:fir:cones")) implementation(project(":compiler:fir:cones"))
implementation(project(":compiler:fir:tree")) implementation(project(":compiler:fir:tree"))
implementation(project(":compiler:fir:resolve")) implementation(project(":compiler:fir:resolve"))
implementation(project(":compiler:frontend.java")) implementation(project(":compiler:frontend.java"))
} }
sourceSets { sourceSets {
"main" { projectDefault() } "main" { projectDefault() }
"test" {} "test" {}
} }
@@ -22,19 +22,19 @@ dependencies {
testRuntimeOnly(intellijPluginDep("java")) testRuntimeOnly(intellijPluginDep("java"))
} }
testRuntime(intellijDep()) testRuntimeOnly(intellijDep())
testCompile(commonDep("junit:junit")) testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit")) testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testCompile(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testCompileOnly(project(":kotlin-reflect-api")) testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect")) testRuntimeOnly(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime")) testRuntimeOnly(project(":core:descriptors.runtime"))
testCompile(projectTests(":compiler:fir:analysis-tests")) testApi(projectTests(":compiler:fir:analysis-tests"))
testCompile(project(":compiler:fir:resolve")) testApi(project(":compiler:fir:resolve"))
testCompile(project(":compiler:fir:dump")) testApi(project(":compiler:fir:dump"))
val asyncProfilerClasspath = project.findProperty("fir.bench.async.profiler.classpath") as? String val asyncProfilerClasspath = project.findProperty("fir.bench.async.profiler.classpath") as? String
if (asyncProfilerClasspath != null) { if (asyncProfilerClasspath != null) {
@@ -16,6 +16,8 @@ repositories {
dependencies { dependencies {
api(project(":compiler:fir:raw-fir:raw-fir.common")) api(project(":compiler:fir:raw-fir:raw-fir.common"))
implementation(project(":compiler:psi"))
implementation(kotlinxCollectionsImmutable())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
@@ -10,6 +10,8 @@ plugins {
dependencies { dependencies {
api(project(":compiler:fir:raw-fir:raw-fir.common")) api(project(":compiler:fir:raw-fir:raw-fir.common"))
implementation(project(":compiler:psi"))
implementation(kotlinxCollectionsImmutable())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
@@ -10,8 +10,9 @@ plugins {
dependencies { dependencies {
api(project(":compiler:fir:tree")) api(project(":compiler:fir:tree"))
api(project(":compiler:psi"))
api("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.2") implementation(kotlinxCollectionsImmutable())
implementation(project(":compiler:psi"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
+5 -7
View File
@@ -8,13 +8,11 @@ repositories {
} }
dependencies { dependencies {
compile(project(":core:compiler.common")) api(project(":core:compiler.common"))
compile(project(":core:descriptors.jvm")) api(project(":compiler:resolution.common"))
compile(project(":core:deserialization")) api(project(":compiler:fir:cones"))
compile(project(":compiler:fir:cones")) api(project(":compiler:fir:tree"))
compile(project(":compiler:fir:tree")) api(kotlinxCollectionsImmutable())
compile(project(":compiler:resolution.common"))
compile("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${property("versions.kotlinx-collections-immutable")}")
implementation(project(":core:util.runtime")) implementation(project(":core:util.runtime"))
compileOnly(project(":kotlin-reflect-api")) compileOnly(project(":kotlin-reflect-api"))
+3
View File
@@ -6,6 +6,9 @@ plugins {
dependencies { dependencies {
testCompile(projectTests(":compiler")) testCompile(projectTests(":compiler"))
Platform[192].orHigher { Platform[192].orHigher {
testCompileOnly(intellijDep()) {
includeJars("gson", "groovy-all", rootProject = rootProject)
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijPluginDep("java")) testRuntimeOnly(intellijPluginDep("java"))
} }
@@ -13,7 +13,7 @@ dependencies {
testImplementation(intellijDep()) { includeJars("trove4j") } //needed only for message bundles testImplementation(intellijDep()) { includeJars("trove4j") } //needed only for message bundles
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(project(":kotlin-test:kotlin-test-junit"))
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${property("versions.kotlinx-collections-immutable")}") implementation(kotlinxCollectionsImmutable())
} }
sourceSets { sourceSets {
+1 -1
View File
@@ -166,7 +166,7 @@ dependencies {
embedded(protobufFull()) embedded(protobufFull())
embedded(kotlinBuiltins(forJvm = true)) embedded(kotlinBuiltins(forJvm = true))
libraries(commonDep("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${property("versions.kotlinx-collections-immutable")}")) libraries(commonDep(kotlinxCollectionsImmutable()))
libraries(commonDep("javax.inject")) libraries(commonDep("javax.inject"))
libraries(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8")) libraries(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8"))
libraries(commonDep("org.jetbrains", "markdown")) libraries(commonDep("org.jetbrains", "markdown"))