[Build] Split :tests-mutes package to common and TC integration parts
This is needed because of following problem:
- :tests-mutes has `implementation` dependency on khttp library
- khttp has dependency on spek-junit-platform-engine library
- :tests-common had `testCompile` dependency on :tests-mutes which
added spek library as as a dependency to all modules which depend
on :tests-common, including :tests-common-new
Then, if project is configured with JPS then if user tries to run all
tests in directory in module which uses JUnit 5 (like :tests-common-new)
then spek library will be added to classpath and junit runner takes
some platform extension from it which causes NoSuchMethodException
because spek library was compiled against outdated JUnit 5 version
and current version doesn't have some API.
So splitting :tests-mutes for two parts fixes this issue, because common
part (:compiler:tests-mutes) no longer depends on khttp, so spek
library doesn't spreads to all modules
This commit is contained in:
+1
-1
@@ -569,7 +569,7 @@ val dist = tasks.register("dist") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val syncMutedTests = tasks.register("syncMutedTests") {
|
val syncMutedTests = tasks.register("syncMutedTests") {
|
||||||
dependsOn(":compiler:tests-mutes:run")
|
dependsOn(":compiler:tests-mutes:tc-integration:run")
|
||||||
}
|
}
|
||||||
|
|
||||||
val copyCompilerToIdeaPlugin by task<Copy> {
|
val copyCompilerToIdeaPlugin by task<Copy> {
|
||||||
|
|||||||
@@ -1,28 +1,13 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
application
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(kotlinStdlib())
|
api(kotlinStdlib())
|
||||||
implementation("khttp:khttp:1.0.0")
|
|
||||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.0")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" {
|
"main" { projectDefault() }
|
||||||
projectDefault()
|
|
||||||
}
|
|
||||||
"test" {}
|
"test" {}
|
||||||
}
|
}
|
||||||
|
|
||||||
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
|
||||||
compileKotlin.kotlinOptions.freeCompilerArgs += "-Xskip-runtime-version-check"
|
|
||||||
|
|
||||||
val mutesPackageName = "org.jetbrains.kotlin.test.mutes"
|
|
||||||
|
|
||||||
application {
|
|
||||||
mainClassName = "$mutesPackageName.MutedTestsSyncKt"
|
|
||||||
applicationDefaultJvmArgs = rootProject.properties.filterKeys { it.startsWith(mutesPackageName) }.map { (k, v) -> "-D$k=$v" }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -92,4 +92,4 @@ private fun parseMutedTest(str: String): MutedTest {
|
|||||||
|
|
||||||
private class ParseError(message: String, override val cause: Throwable? = null) : IllegalArgumentException(message)
|
private class ParseError(message: String, override val cause: Throwable? = null) : IllegalArgumentException(message)
|
||||||
|
|
||||||
internal fun flakyTests(file: File) = loadMutedTests(file).filter { it.isFlaky }
|
fun flakyTests(file: File): List<MutedTest> = loadMutedTests(file).filter { it.isFlaky }
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
id("jps-compatible")
|
||||||
|
application
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(kotlinStdlib())
|
||||||
|
implementation(project(":compiler:tests-mutes"))
|
||||||
|
implementation("khttp:khttp:1.0.0")
|
||||||
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
"test" {}
|
||||||
|
}
|
||||||
|
|
||||||
|
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
||||||
|
compileKotlin.kotlinOptions.freeCompilerArgs += "-Xskip-runtime-version-check"
|
||||||
|
|
||||||
|
val mutesPackageName = "org.jetbrains.kotlin.test.mutes"
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClassName = "$mutesPackageName.MutedTestsSyncKt"
|
||||||
|
applicationDefaultJvmArgs = rootProject.properties.filterKeys { it.startsWith(mutesPackageName) }.map { (k, v) -> "-D$k=$v" }
|
||||||
|
}
|
||||||
@@ -117,6 +117,7 @@ include ":benchmarks",
|
|||||||
":compiler:android-tests",
|
":compiler:android-tests",
|
||||||
":compiler:tests-common",
|
":compiler:tests-common",
|
||||||
":compiler:tests-mutes",
|
":compiler:tests-mutes",
|
||||||
|
":compiler:tests-mutes:tc-integration",
|
||||||
":compiler:tests-common-jvm6",
|
":compiler:tests-common-jvm6",
|
||||||
":compiler:tests-against-klib",
|
":compiler:tests-against-klib",
|
||||||
":dukat",
|
":dukat",
|
||||||
|
|||||||
Reference in New Issue
Block a user