Skip to content

Commit 8fffa1f

Browse files
committed
fix screenshots and kover config
1 parent 0622d0f commit 8fffa1f

5 files changed

Lines changed: 20 additions & 15 deletions

File tree

‎build.gradle.kts‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,44 +75,49 @@ tasks.register("runDev", JavaExec::class) {
7575
)
7676
}
7777

78-
kover { reports { filters { excludes { classes("dartzee.screen.TestWindow") } } } }
78+
kover {
79+
currentProject {
80+
instrumentation {
81+
disabledForTestTasks.add("test")
82+
disabledForTestTasks.add("updateScreenshots")
83+
disabledForTestTasks.add("integrationAndE2E")
84+
}
85+
}
86+
87+
reports { filters { excludes { classes("dartzee.screen.TestWindow") } } }
88+
}
7989

8090
val test by testing.suites.existing(JvmTestSuite::class)
91+
val derviedTestClassesDirs = files(test.map { it.sources.output.classesDirs })
92+
val derivedTestClasspath = files(test.map { it.sources.runtimeClasspath })
8193

8294
tasks.register("unitTest", Test::class) {
8395
group = "verification"
8496
useJUnitPlatform { excludeTags = setOf("integration", "e2e") }
8597

86-
testClassesDirs = files(test.map { it.sources.output.classesDirs })
87-
classpath = files(test.map { it.sources.runtimeClasspath })
98+
testClassesDirs = derviedTestClassesDirs
99+
classpath = derivedTestClasspath
88100
}
89101

90102
tasks.register("updateScreenshots", Test::class) {
91103
group = "verification"
92104
useJUnitPlatform { includeTags = setOf("screenshot") }
93105

94106
jvmArgs = listOf("-DupdateSnapshots=true")
95-
kover { isEnabled = false }
96107

97-
testClassesDirs = files(test.map { it.sources.output.classesDirs })
98-
classpath = files(test.map { it.sources.runtimeClasspath })
108+
testClassesDirs = derviedTestClassesDirs
109+
classpath = derivedTestClasspath
99110
}
100111

101112
tasks.register("integrationAndE2E", Test::class) {
102113
group = "verification"
103114
useJUnitPlatform { includeTags = setOf("integration", "e2e") }
104-
kover { isEnabled = false }
105115

106-
testClassesDirs = files(test.map { it.sources.output.classesDirs })
107-
classpath = files(test.map { it.sources.runtimeClasspath })
116+
testClassesDirs = derviedTestClassesDirs
117+
classpath = derivedTestClasspath
108118
}
109119

110-
tasks {
111-
named<Test>("test") {
112-
useJUnitPlatform()
113-
kover { isEnabled = false }
114-
}
115-
}
120+
tasks { named<Test>("test") { useJUnitPlatform() } }
116121

117122
tasks.withType<Test> {
118123
minHeapSize = "1024m"
-12 Bytes
Loading
-10 Bytes
Loading
-175 Bytes
Loading
-132 Bytes
Loading

0 commit comments

Comments
 (0)