-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle.kts
28 lines (25 loc) · 1.12 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kotestMultiplatform) apply false
}
val rootBuildDir = rootProject.layout.buildDirectory.get()
allprojects {
val rootBuildDir = rootProject.layout.buildDirectory.get()
val outputDirName = project.path.toString().trimStart(':').replace(":", "_")
tasks.withType<Test> {
// Copy in system properties.
systemProperties = System.getProperties().asIterable().associate { it.key.toString() to it.value }
reports.junitXml.outputLocation = rootProject.file("build/test-results/${outputDirName}")
val outputDir = reports.junitXml.outputLocation.get()
reports.junitXml.required.set(true)
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Djunit.platform.reporting.open.xml.enabled=true",
"-Djunit.platform.reporting.output.dir=${outputDir.asFile.absolutePath}"
)
}
}
}