move test config to code-quality
convention plugin
This commit is contained in:
parent
acfaaec754
commit
671e4c6810
2 changed files with 12 additions and 13 deletions
|
@ -1,9 +1,5 @@
|
|||
package buildsrc.conventions
|
||||
|
||||
import buildsrc.utils.Rife2TestListener
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
/** common config for all subprojects */
|
||||
|
||||
plugins {
|
||||
|
@ -20,12 +16,3 @@ tasks.withType<AbstractArchiveTask>().configureEach {
|
|||
isPreserveFileTimestamps = false
|
||||
isReproducibleFileOrder = true
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
val testsBadgeApiKey = providers.gradleProperty("testsBadgeApiKey")
|
||||
addTestListener(Rife2TestListener(testsBadgeApiKey))
|
||||
testLogging {
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
package buildsrc.conventions
|
||||
|
||||
import buildsrc.utils.Rife2TestListener
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import org.sonarqube.gradle.SonarTask
|
||||
|
||||
plugins {
|
||||
|
@ -39,3 +42,12 @@ sonarqube {
|
|||
tasks.withType<SonarTask>().configureEach {
|
||||
dependsOn(tasks.matching { it.name == "koverXmlReport" })
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
val testsBadgeApiKey = providers.gradleProperty("testsBadgeApiKey")
|
||||
addTestListener(Rife2TestListener(testsBadgeApiKey))
|
||||
testLogging {
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue