@@ -28,7 +28,7 @@ class ScoveragePlugin implements Plugin<PluginAware> {
28
28
29
29
static final String DEFAULT_REPORT_DIR = ' reports' + File . separatorChar + ' scoverage'
30
30
31
- private final ConcurrentHashMap<Task , Set<? extends Task > > taskDependencies = new ConcurrentHashMap<> ();
31
+ private final ConcurrentHashMap<Task , Set<? extends Task > > taskDependencies = new ConcurrentHashMap<> ()
32
32
33
33
@Override
34
34
void apply (PluginAware pluginAware ) {
@@ -232,9 +232,10 @@ class ScoveragePlugin implements Plugin<PluginAware> {
232
232
compileTask. configure {
233
233
if (! graph. hasTask(originalCompileTask)) {
234
234
project. logger. info(" Making scoverage compilation the primary compilation task (instead of compileScala)" )
235
- destinationDir = originalCompileTask. destinationDir
235
+ destinationDirectory = originalCompileTask. destinationDirectory
236
236
} else {
237
237
doFirst {
238
+ def destinationDir = destinationDirectory. get(). asFile
238
239
destinationDir. deleteDir()
239
240
}
240
241
@@ -243,7 +244,9 @@ class ScoveragePlugin implements Plugin<PluginAware> {
243
244
project. logger. info(" Deleting classes compiled by scoverage but non-instrumented (identical to normal compilation)" )
244
245
def originalCompileTaskName = project. sourceSets. getByName(SourceSet . MAIN_SOURCE_SET_NAME )
245
246
.getCompileTaskName(" scala" )
246
- def originalDestinationDir = project. tasks[originalCompileTaskName]. destinationDir
247
+ def originalDestinationDirectory = project. tasks[originalCompileTaskName]. destinationDirectory
248
+ def originalDestinationDir = originalDestinationDirectory. get(). asFile
249
+ def destinationDir = destinationDirectory. get(). asFile
247
250
248
251
def findFiles = { File dir , Closure<Boolean > condition = null ->
249
252
def files = []
0 commit comments