@@ -44,8 +44,8 @@ class ScoverageExtension {
44
44
45
45
ScoverageExtension (Project project ) {
46
46
47
- project. plugins. apply(JavaPlugin . class);
48
- project. plugins. apply(ScalaPlugin . class);
47
+ project. plugins. apply(JavaPlugin . class)
48
+ project. plugins. apply(ScalaPlugin . class)
49
49
project. afterEvaluate(configureRuntimeOptions)
50
50
51
51
project. configurations. create(ScoveragePlugin . CONFIGURATION_NAME ) {
@@ -82,18 +82,18 @@ class ScoverageExtension {
82
82
from mainSourceSet. output
83
83
}
84
84
project. artifacts {
85
- scoverage project . tasks . jarScoverage
85
+ scoverage scoverageJar
86
86
}
87
87
88
88
project. tasks. create(ScoveragePlugin . TEST_NAME , Test . class) {
89
89
conventionMapping. map(" testClassesDir" , new Callable<Object > () {
90
- public Object call () throws Exception {
91
- return testSourceSet. output. classesDir;
90
+ Object call () throws Exception {
91
+ return testSourceSet. output. classesDir
92
92
}
93
93
})
94
94
conventionMapping. map(" classpath" , new Callable<Object > () {
95
- public Object call () throws Exception {
96
- return testSourceSet. runtimeClasspath;
95
+ Object call () throws Exception {
96
+ return testSourceSet. runtimeClasspath
97
97
}
98
98
})
99
99
}
@@ -126,7 +126,7 @@ class ScoverageExtension {
126
126
File pluginFile
127
127
try {
128
128
pluginFile = configuration. filter { it. name. contains(' plugin' ) }. iterator(). next()
129
- } catch (NoSuchElementException e ) {
129
+ } catch (NoSuchElementException ignored ) {
130
130
throw new GradleException (" Could not find a plugin jar in configuration '${ ScoveragePlugin.CONFIGURATION_NAME} '" )
131
131
}
132
132
@@ -153,7 +153,7 @@ class ScoverageExtension {
153
153
// the compile task creates a store of measured statements
154
154
outputs. file(new File (extension. dataDir, ' scoverage.coverage.xml' ))
155
155
}
156
- t. tasks[ScoveragePlugin . TEST_NAME ]. outputs. dir( extension. dataDir)
156
+ t. tasks[ScoveragePlugin . TEST_NAME ]. outputs. files( " ${ extension.dataDir} /scoverage.measurements.* " )
157
157
t. tasks[ScoveragePlugin . REPORT_NAME ]. configure {
158
158
inputs. dir(extension. dataDir)
159
159
outputs. dir(extension. reportDir)
0 commit comments