225b064470
This mode must be used when one configuration will run several tests for different JUnit versions.
75 lines
1.9 KiB
Kotlin
75 lines
1.9 KiB
Kotlin
import org.jetbrains.kotlin.ideaExt.idea
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
id("jps-compatible")
|
|
}
|
|
|
|
dependencies {
|
|
testApi(project(":compiler:fir:entrypoint"))
|
|
testApi(project(":compiler:cli"))
|
|
testImplementation(project(":compiler:ir.tree.impl"))
|
|
testImplementation(project(":compiler:backend.jvm.lower"))
|
|
testImplementation(project(":compiler:backend.jvm.entrypoint"))
|
|
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
|
|
|
|
testCompileOnly(project(":kotlin-reflect-api"))
|
|
testRuntimeOnly(project(":kotlin-reflect"))
|
|
testRuntimeOnly(project(":core:descriptors.runtime"))
|
|
|
|
testImplementation(projectTests(":generators:test-generator"))
|
|
|
|
testApiJUnit5()
|
|
testApi(projectTests(":compiler:test-infrastructure"))
|
|
testApi(projectTests(":compiler:test-infrastructure-utils"))
|
|
testApi(projectTests(":compiler:tests-compiler-utils"))
|
|
testApi(projectTests(":compiler:tests-common-jvm6"))
|
|
|
|
/*
|
|
* Actually those dependencies are needed only at runtime, but they
|
|
* declared as Api dependencies to propagate them to all modules
|
|
* which depend on current one
|
|
*/
|
|
testApi(intellijDep()) {
|
|
includeJars(
|
|
"intellij-deps-fastutil-8.4.1-4",
|
|
"idea_rt",
|
|
"jps-model",
|
|
"platform-impl",
|
|
"streamex",
|
|
"jna",
|
|
rootProject = rootProject
|
|
)
|
|
}
|
|
|
|
testApi(toolsJar())
|
|
}
|
|
|
|
val generationRoot = projectDir.resolve("tests-gen")
|
|
|
|
sourceSets {
|
|
"main" { none() }
|
|
"test" {
|
|
projectDefault()
|
|
this.java.srcDir(generationRoot.name)
|
|
}
|
|
}
|
|
|
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|
apply(plugin = "idea")
|
|
idea {
|
|
this.module.generatedSourceDirs.add(generationRoot)
|
|
}
|
|
}
|
|
|
|
projectTest(jUnitMode = JUnitMode.JUnit5) {
|
|
dependsOn(":dist")
|
|
workingDir = rootDir
|
|
jvmArgs!!.removeIf { it.contains("-Xmx") }
|
|
maxHeapSize = "3g"
|
|
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
testsJar()
|