[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

View File

@@ -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.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).
*

View File

@@ -11,14 +11,14 @@ plugins {
dependencies {
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-junit"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":compiler:fir:checkers"))
testCompile(project(":compiler:frontend"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":compiler:fir:checkers"))
testApi(project(":compiler:frontend"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect"))
@@ -42,4 +42,4 @@ projectTest(parallel = true) {
maxHeapSize = "3g"
}
testsJar()
testsJar()

View File

@@ -4,8 +4,14 @@ plugins {
}
dependencies {
compile(project(":compiler:fir:resolve"))
api(project(":compiler:frontend"))
api(project(":compiler:fir:resolve"))
/*
* 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(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }

View File

@@ -13,23 +13,23 @@ repositories {
}
dependencies {
compile(project(":core:descriptors"))
compile(project(":core:deserialization"))
compile(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree"))
compile(project(":compiler:fir:resolve"))
compile(project(":compiler:fir:java"))
compile(project(":compiler:cli"))
implementation(project(":core:descriptors"))
implementation(project(":core:deserialization"))
implementation(project(":compiler:fir:cones"))
implementation(project(":compiler:fir:tree"))
implementation(project(":compiler:fir:resolve"))
implementation(project(":compiler:fir:java"))
implementation(project(":compiler:cli"))
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("commons-lang-2.4") }
compile("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
}
sourceSets {
"main" { projectDefault() }
}
testsJar()
testsJar()

View File

@@ -4,13 +4,14 @@ plugins {
}
dependencies {
compile(project(":core:descriptors"))
compile(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree"))
compile(project(":compiler:fir:resolve"))
implementation(project(":core:descriptors"))
implementation(project(":compiler:fir:fir-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) }
}

View File

@@ -5,6 +5,7 @@ plugins {
dependencies {
compileOnly(project(":core:descriptors"))
compileOnly(project(":core:descriptors.jvm"))
compileOnly(project(":compiler:fir:cones"))
compileOnly(project(":compiler:fir:resolve"))
compileOnly(project(":compiler:fir:tree"))
@@ -16,18 +17,18 @@ dependencies {
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-junit"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":compiler:fir:analysis-tests"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:fir:analysis-tests"))
testApi(project(":compiler:resolution.common"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }

View File

@@ -5,12 +5,12 @@ plugins {
}
dependencies {
compile(project(":compiler:frontend.common"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:fir:resolve"))
compile(project(":compiler:fir:checkers"))
implementation(project(":compiler:fir:jvm"))
api(project(":compiler:frontend.common"))
api(project(":compiler:fir:resolve"))
api(project(":compiler:fir:checkers"))
api(project(":compiler:fir:jvm"))
api(project(":compiler:fir:fir-deserialization"))
implementation(project(":compiler:frontend.java"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
}

View File

@@ -4,16 +4,13 @@ plugins {
}
dependencies {
implementation(project(":compiler:fir:cones"))
implementation(project(":compiler:fir:tree"))
implementation(project(":compiler:fir:resolve"))
implementation(project(":compiler:frontend.java"))
}
sourceSets {
"main" { projectDefault() }
"test" {}
}
}

View File

@@ -22,19 +22,19 @@ dependencies {
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-junit"))
testCompile(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:tests-common"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime"))
testCompile(projectTests(":compiler:fir:analysis-tests"))
testCompile(project(":compiler:fir:resolve"))
testCompile(project(":compiler:fir:dump"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApi(projectTests(":compiler:fir:analysis-tests"))
testApi(project(":compiler:fir:resolve"))
testApi(project(":compiler:fir:dump"))
val asyncProfilerClasspath = project.findProperty("fir.bench.async.profiler.classpath") as? String
if (asyncProfilerClasspath != null) {

View File

@@ -16,6 +16,8 @@ repositories {
dependencies {
api(project(":compiler:fir:raw-fir:raw-fir.common"))
implementation(project(":compiler:psi"))
implementation(kotlinxCollectionsImmutable())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }

View File

@@ -10,6 +10,8 @@ plugins {
dependencies {
api(project(":compiler:fir:raw-fir:raw-fir.common"))
implementation(project(":compiler:psi"))
implementation(kotlinxCollectionsImmutable())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }

View File

@@ -10,8 +10,9 @@ plugins {
dependencies {
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) }

View File

@@ -8,13 +8,11 @@ repositories {
}
dependencies {
compile(project(":core:compiler.common"))
compile(project(":core:descriptors.jvm"))
compile(project(":core:deserialization"))
compile(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree"))
compile(project(":compiler:resolution.common"))
compile("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${property("versions.kotlinx-collections-immutable")}")
api(project(":core:compiler.common"))
api(project(":compiler:resolution.common"))
api(project(":compiler:fir:cones"))
api(project(":compiler:fir:tree"))
api(kotlinxCollectionsImmutable())
implementation(project(":core:util.runtime"))
compileOnly(project(":kotlin-reflect-api"))

View File

@@ -6,6 +6,9 @@ plugins {
dependencies {
testCompile(projectTests(":compiler"))
Platform[192].orHigher {
testCompileOnly(intellijDep()) {
includeJars("gson", "groovy-all", rootProject = rootProject)
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijPluginDep("java"))
}

View File

@@ -13,7 +13,7 @@ dependencies {
testImplementation(intellijDep()) { includeJars("trove4j") } //needed only for message bundles
testImplementation(project(":kotlin-test:kotlin-test-junit"))
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:${property("versions.kotlinx-collections-immutable")}")
implementation(kotlinxCollectionsImmutable())
}
sourceSets {

View File

@@ -166,7 +166,7 @@ dependencies {
embedded(protobufFull())
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("org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8"))
libraries(commonDep("org.jetbrains", "markdown"))