Files
kotlin-fork/compiler/fir/fir2ir/build.gradle.kts
T
Dmitriy Novozhilov 9ee60e4648 [Build] Exclude FIR codegen tests with PSI mode from aggregate test suite
Also add nightly configuration for them
2023-02-20 08:40:31 +00:00

101 lines
2.9 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)
}
}
fun Test.configure(configureJUnit: JUnitPlatformOptions.() -> Unit = {}) {
dependsOn(":dist")
workingDir = rootDir
useJUnitPlatform {
configureJUnit()
}
}
projectTest(jUnitMode = JUnitMode.JUnit5) {
configure()
}
projectTest("aggregateTests", jUnitMode = JUnitMode.JUnit5) {
configure {
excludeTags("FirPsiCodegenTest")
}
}
projectTest("nightlyTests", jUnitMode = JUnitMode.JUnit5) {
configure {
includeTags("FirPsiCodegenTest")
}
}
testsJar()