Skip to content

Commit 35bb88e

Browse files
committed
wildcard patterns are not supported on windows
1 parent 37fa6e1 commit 35bb88e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/groovy/org/scoverage/ScoverageExtension.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,19 @@ class ScoverageExtension {
144144
// the compile task creates a store of measured statements
145145
outputs.file(new File(extension.dataDir, 'scoverage.coverage.xml'))
146146
}
147-
t.tasks[ScoveragePlugin.TEST_NAME].outputs.files("${extension.dataDir}/scoverage.measurements.*")
147+
t.tasks[ScoveragePlugin.TEST_NAME].outputs.upToDateWhen { extension.dataDir.listFiles(measurementFile) }
148148
t.tasks[ScoveragePlugin.REPORT_NAME].configure {
149149
inputs.dir(extension.dataDir)
150150
outputs.dir(extension.reportDir)
151151
}
152152
}
153+
154+
FilenameFilter measurementFile = new FilenameFilter() {
155+
@Override
156+
boolean accept(File dir, String name) {
157+
return name.startsWith("scoverage.measurements.")
158+
}
159+
}
160+
153161
}
154162
}

0 commit comments

Comments
 (0)