Files
kotlin-fork/compiler/fir/fir2ir/build.gradle.kts
T
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00

83 lines
2.5 KiB
Kotlin

import org.jetbrains.kotlin.ideaExt.idea
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
compileOnly(project(":core:descriptors"))
compileOnly(project(":core:descriptors.jvm"))
compileOnly(project(":compiler:fir:cones"))
compileOnly(project(":compiler:fir:resolve"))
compileOnly(project(":compiler:fir:providers"))
compileOnly(project(":compiler:fir:semantics"))
compileOnly(project(":compiler:fir:tree"))
compileOnly(project(":compiler:ir.tree"))
compileOnly(project(":compiler:ir.psi2ir"))
compileOnly(project(":compiler:ir.backend.common"))
compileOnly(project(":compiler:ir.serialization.common"))
compileOnly(intellijCore())
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:tests-compiler-utils"))
testApi(projectTests(":compiler:tests-common-new"))
testApi(projectTests(":compiler:fir:analysis-tests"))
testApi(project(":compiler:fir:fir-serialization"))
testApiJUnit5()
testRuntimeOnly(project(":core:deserialization"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":core:descriptors.jvm"))
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))
testRuntimeOnly(project(":generators"))
testCompileOnly(intellijCore())
testRuntimeOnly(intellijCore())
testRuntimeOnly(commonDependency("net.java.dev.jna:jna"))
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
testRuntimeOnly(commonDependency("one.util:streamex"))
testRuntimeOnly(jpsModel())
testRuntimeOnly(jpsModelImpl())
}
val generationRoot = projectDir.resolve("tests-gen")
sourceSets {
"main" { projectDefault() }
"test" {
projectDefault()
this.java.srcDir(generationRoot.name)
}
}
tasks {
val compileKotlin by existing(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI"
}
}
}
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
apply(plugin = "idea")
idea {
this.module.generatedSourceDirs.add(generationRoot)
}
}
projectTest(jUnitMode = JUnitMode.JUnit5) {
dependsOn(":dist")
workingDir = rootDir
useJUnitPlatform()
}
testsJar()