chore: カバレッジ計測時のみテストを失敗しないように

This commit is contained in:
usbharu 2023-11-06 23:59:17 +09:00
parent ad25a45c42
commit 8ea8a6b00f
1 changed files with 13 additions and 2 deletions

View File

@ -32,7 +32,6 @@ tasks.withType<Test> {
val cpus = Runtime.getRuntime().availableProcessors()
maxParallelForks = max(1, cpus - 1)
setForkEvery(4)
ignoreFailures = true
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().configureEach {
@ -202,8 +201,20 @@ configurations.matching { it.name == "detekt" }.all {
}
}
project.gradle.taskGraph.whenReady {
println(this.allTasks)
this.allTasks.map { println(it.name) }
if (this.hasTask(":koverGenerateArtifact")) {
println("has task")
val task = this.allTasks.find { it.name == "test" }
val verificationTask = task as VerificationTask
verificationTask.ignoreFailures = true
}
}
kover {
excludeSourceSets {
excludeSourceSets {
names("aot")
}
}