[Build] Extract configuration of JUnit5 dependencies to common helper in buildSrc

This commit is contained in:
Dmitriy Novozhilov
2021-02-01 12:21:29 +03:00
parent dea3c954f1
commit c432efc364
10 changed files with 63 additions and 42 deletions
+1 -12
View File
@@ -24,10 +24,7 @@ dependencies {
testApi(project(":compiler:fir:entrypoint"))
testApi(project(":compiler:frontend"))
testApi(platform("org.junit:junit-bom:5.7.0"))
testApi("org.junit.jupiter:junit-jupiter")
testApi("org.junit.platform:junit-platform-commons:1.7.0")
testApi("org.junit.platform:junit-platform-launcher:1.7.0")
testApiJUnit5()
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
@@ -35,14 +32,6 @@ dependencies {
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
testImplementation(intellijDep()) {
// This dependency is needed only for FileComparisonFailure
includeJars("idea_rt", rootProject = rootProject)
isTransitive = false
}
// This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes
testRuntimeOnly(commonDep("junit:junit"))
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
+1 -4
View File
@@ -30,10 +30,7 @@ dependencies {
testApi(projectTests(":compiler:fir:analysis-tests"))
testApi(project(":compiler:fir:fir-serialization"))
testApi(platform("org.junit:junit-bom:5.7.0"))
testApi("org.junit.jupiter:junit-jupiter")
testApi("org.junit.platform:junit-platform-commons:1.7.0")
testApi("org.junit.platform:junit-platform-launcher:1.7.0")
testApiJUnit5()
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
+1 -12
View File
@@ -17,23 +17,12 @@ dependencies {
testImplementation(projectTests(":generators:test-generator"))
testApi(platform("org.junit:junit-bom:5.7.0"))
testApi("org.junit.jupiter:junit-jupiter")
testApi("org.junit.platform:junit-platform-commons:1.7.0")
testApi("org.junit.platform:junit-platform-launcher:1.7.0")
testApiJUnit5()
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:tests-compiler-utils"))
testApi(projectTests(":compiler:tests-common-jvm6"))
testImplementation(intellijDep()) {
// This dependency is needed only for FileComparisonFailure
includeJars("idea_rt", rootProject = rootProject)
isTransitive = false
}
// This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes
testRuntimeOnly(commonDep("junit:junit"))
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
@@ -12,21 +12,13 @@ dependencies {
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:tests-compiler-utils"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":compiler:tests-common-new"))
testApi(platform("org.junit:junit-bom:5.7.0"))
testApi("org.junit.jupiter:junit-jupiter")
testApi("org.junit.vintage:junit-vintage-engine:5.7.0")
testApi("org.junit.platform:junit-platform-commons:1.7.0")
testApi("org.junit.platform:junit-platform-launcher:1.7.0")
testApi("org.junit.platform:junit-platform-runner:1.7.0")
testApi("org.junit.platform:junit-platform-suite-api:1.7.0")
testApiJUnit5(vintageEngine = true, runner = true, suiteApi = true)
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(project(":kotlin-reflect"))
testRuntime(intellijDep())
testRuntime(intellijDep())
testJvm6ServerRuntime(projectTests(":compiler:tests-common-jvm6"))
}
@@ -7,8 +7,7 @@ dependencies {
testRuntimeOnly(intellijDep()) // Should come before compiler, because of "progarded" stuff needed for tests
testImplementation(kotlinStdlib())
testImplementation(platform("org.junit:junit-bom:5.7.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testApiJUnit5()
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:test-infrastructure"))
testImplementation(projectTests(":compiler:tests-common-new"))