@@ -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
8090val 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
8294tasks.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
90102tasks.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
101112tasks.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
117122tasks.withType<Test > {
118123 minHeapSize = " 1024m"
0 commit comments