[Build] Remove testApiJUnit5 parameters
Instead of declaring additional dependencies inside the method, declare them directly #KTI-1349 In Progress
This commit is contained in:
committed by
Space Team
parent
7a1dc1f89b
commit
0ecbb64c64
@@ -23,7 +23,8 @@ dependencies {
|
|||||||
|
|
||||||
testCompileOnly(project(":compiler:cli-common"))
|
testCompileOnly(project(":compiler:cli-common"))
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
testApiJUnit5(jupiterParams = true)
|
testApiJUnit5()
|
||||||
|
testImplementation(libs.junit.jupyter.params)
|
||||||
testApi(libs.junit4)
|
testApi(libs.junit4)
|
||||||
testApi(protobufFull())
|
testApi(protobufFull())
|
||||||
testApi(kotlinStdlib())
|
testApi(kotlinStdlib())
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ dependencies {
|
|||||||
testApi(projectTests(":compiler:tests-compiler-utils"))
|
testApi(projectTests(":compiler:tests-compiler-utils"))
|
||||||
testApi(projectTests(":compiler:tests-common-new"))
|
testApi(projectTests(":compiler:tests-common-new"))
|
||||||
|
|
||||||
testApiJUnit5(vintageEngine = true, runner = true, suiteApi = true)
|
testApiJUnit5()
|
||||||
|
testApi(libs.junit.platform.runner)
|
||||||
|
testApi(libs.junit.platform.suite.api)
|
||||||
|
runtimeOnly(libs.junit.vintage.engine)
|
||||||
|
|
||||||
testImplementation(intellijCore())
|
testImplementation(intellijCore())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ dependencies {
|
|||||||
|
|
||||||
testRuntimeOnly(project(":core:descriptors.runtime"))
|
testRuntimeOnly(project(":core:descriptors.runtime"))
|
||||||
|
|
||||||
testApiJUnit5(vintageEngine = true, jupiterParams = true)
|
testApiJUnit5()
|
||||||
|
testImplementation(libs.junit.jupyter.params)
|
||||||
|
runtimeOnly(libs.junit.vintage.engine)
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ val testJsRuntime by configurations.creating {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testApiJUnit5(vintageEngine = true)
|
testApiJUnit5()
|
||||||
|
testRuntimeOnly(libs.junit.vintage.engine)
|
||||||
|
|
||||||
testApi(protobufFull())
|
testApi(protobufFull())
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
|
|||||||
@@ -96,7 +96,9 @@ dependencies {
|
|||||||
testImplementation(gradleApi())
|
testImplementation(gradleApi())
|
||||||
testImplementation(gradleTestKit())
|
testImplementation(gradleTestKit())
|
||||||
testImplementation(commonDependency("com.google.code.gson:gson"))
|
testImplementation(commonDependency("com.google.code.gson:gson"))
|
||||||
testApiJUnit5(vintageEngine = true, jupiterParams = true)
|
testApiJUnit5()
|
||||||
|
testRuntimeOnly(libs.junit.vintage.engine)
|
||||||
|
testImplementation(libs.junit.jupyter.params)
|
||||||
|
|
||||||
testRuntimeOnly(project(":compiler:tests-mutes"))
|
testRuntimeOnly(project(":compiler:tests-mutes"))
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ dependencies {
|
|||||||
testCompileOnly(project(":kotlin-compiler"))
|
testCompileOnly(project(":kotlin-compiler"))
|
||||||
testImplementation(project(":kotlin-scripting-jvm-host-unshaded"))
|
testImplementation(project(":kotlin-scripting-jvm-host-unshaded"))
|
||||||
|
|
||||||
testApiJUnit5(vintageEngine = true)
|
testApiJUnit5()
|
||||||
|
testRuntimeOnly(libs.junit.vintage.engine)
|
||||||
|
|
||||||
testApi(projectTests(":compiler:tests-common-new"))
|
testApi(projectTests(":compiler:tests-common-new"))
|
||||||
testApi(projectTests(":compiler:test-infrastructure"))
|
testApi(projectTests(":compiler:test-infrastructure"))
|
||||||
|
|||||||
@@ -193,45 +193,19 @@ fun DependencyHandler.jpsLikeModuleDependency(moduleName: String, scope: JpsDepS
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun Project.testApiJUnit5(
|
fun Project.testApiJUnit5() {
|
||||||
vintageEngine: Boolean = false,
|
|
||||||
runner: Boolean = false,
|
|
||||||
suiteApi: Boolean = false,
|
|
||||||
jupiterParams: Boolean = false
|
|
||||||
) {
|
|
||||||
with(dependencies) {
|
with(dependencies) {
|
||||||
val libsVersionCatalog = libsVersionCatalog
|
val libsVersionCatalog = libsVersionCatalog
|
||||||
testApi(platform(libsVersionCatalog.findLibrary("junit-bom").orElseThrow { GradleException("No version for `junit-bom`") }))
|
testApi(platform(libsVersionCatalog.findLibrary("junit-bom").orElseThrow { GradleException("No version for `junit-bom`") }))
|
||||||
testApi(libsVersionCatalog.findLibrary("junit-jupyter-api").orElseThrow { GradleException("No version for `junit-jupyter-api`") })
|
testApi(libsVersionCatalog.findLibrary("junit-jupyter-api").orElseThrow { GradleException("No version for `junit-jupyter-api`") })
|
||||||
testRuntimeOnly(libsVersionCatalog.findLibrary("junit-jupyter-engine").orElseThrow { GradleException("No version for `junit-jupyter-engine`") })
|
testRuntimeOnly(
|
||||||
if (vintageEngine) {
|
libsVersionCatalog.findLibrary("junit-jupyter-engine").orElseThrow { GradleException("No version for `junit-jupyter-engine`") })
|
||||||
testRuntimeOnly(
|
|
||||||
libsVersionCatalog.findLibrary("junit-vintage-engine")
|
|
||||||
.orElseThrow { GradleException("No version for `junit-vintage-engine`") })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jupiterParams) {
|
|
||||||
testApi(
|
|
||||||
libsVersionCatalog.findLibrary("junit-jupyter-params")
|
|
||||||
.orElseThrow { GradleException("No version for `junit-jupyter-params`") })
|
|
||||||
}
|
|
||||||
|
|
||||||
testApi(
|
testApi(
|
||||||
libsVersionCatalog.findLibrary("junit-platform-commons")
|
libsVersionCatalog.findLibrary("junit-platform-commons")
|
||||||
.orElseThrow { GradleException("No version for `junit-platform-commons`") })
|
.orElseThrow { GradleException("No version for `junit-platform-commons`") })
|
||||||
testApi(
|
testApi(
|
||||||
libsVersionCatalog.findLibrary("junit-platform-launcher")
|
libsVersionCatalog.findLibrary("junit-platform-launcher")
|
||||||
.orElseThrow { GradleException("No version for `junit-platform-launcher`") })
|
.orElseThrow { GradleException("No version for `junit-platform-launcher`") })
|
||||||
if (runner) {
|
|
||||||
testApi(
|
|
||||||
libsVersionCatalog.findLibrary("junit-platform-runner")
|
|
||||||
.orElseThrow { GradleException("No version for `junit-platform-runner`") })
|
|
||||||
}
|
|
||||||
if (suiteApi) {
|
|
||||||
testApi(
|
|
||||||
libsVersionCatalog.findLibrary("junit-platform-suite-api")
|
|
||||||
.orElseThrow { GradleException("No version for `junit-platform-suite-api`") })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user