[Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration

Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
This commit is contained in:
Alexander.Likhachev
2023-08-23 14:04:23 +02:00
committed by Space Team
parent 0ecbb64c64
commit 53fde520d5
45 changed files with 121 additions and 55 deletions
@@ -17,6 +17,8 @@ dependencies {
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:tests-common-new"))
testImplementation(projectTests(":analysis:analysis-test-framework"))
testImplementation(libs.junit.jupyter.api)
testRuntimeOnly(libs.junit.jupyter.engine)
}
sourceSets {
@@ -24,7 +26,7 @@ sourceSets {
"test" { projectDefault() }
}
projectTest {
projectTest(jUnitMode = JUnitMode.JUnit5) {
workingDir = rootDir
}
@@ -18,6 +18,8 @@ dependencies {
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:tests-common-new"))
testImplementation(projectTests(":analysis:decompiled:decompiler-to-file-stubs"))
testImplementation(libs.junit.jupyter.api)
testRuntimeOnly(libs.junit.jupyter.engine)
}
sourceSets {
@@ -25,7 +27,7 @@ sourceSets {
"test" { projectDefault() }
}
projectTest {
projectTest(jUnitMode = JUnitMode.JUnit5) {
workingDir = rootDir
}
@@ -23,6 +23,9 @@ dependencies {
api(project(":kotlin-util-klib-metadata"))
compileOnly(intellijCore())
testApi(platform(libs.junit.bom))
testImplementation(libs.junit4)
testCompileOnly(libs.junit.jupiter.api) // the annotations are misused and have no effect
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:tests-common-new"))
testImplementation(projectTests(":analysis:decompiled:decompiler-to-file-stubs"))