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
|
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 */
|
/** common config for all subprojects */
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
@ -20,12 +16,3 @@ tasks.withType<AbstractArchiveTask>().configureEach {
|
||||||
isPreserveFileTimestamps = false
|
isPreserveFileTimestamps = false
|
||||||
isReproducibleFileOrder = true
|
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
|
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
|
import org.sonarqube.gradle.SonarTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
@ -39,3 +42,12 @@ sonarqube {
|
||||||
tasks.withType<SonarTask>().configureEach {
|
tasks.withType<SonarTask>().configureEach {
|
||||||
dependsOn(tasks.matching { it.name == "koverXmlReport" })
|
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