@@ -12,21 +12,21 @@ import org.gradle.api.tasks.testing.Test
1212 * Defines a new Test Task which executes normal tests with the instrumented classes.
1313 * Defines a new Check Task which enforces an overall line coverage requirement.
1414 */
15- class ScctExtension {
15+ class ScoverageExtension {
1616
17- ScctExtension (Project project ) {
17+ ScoverageExtension (Project project ) {
1818
1919 project. plugins. apply(JavaPlugin . class);
2020 project. plugins. apply(ScalaPlugin . class);
2121 project. afterEvaluate(configureRuntimeOptions)
2222
23- project. configurations. create(ScctPlugin . CONFIGURATION_NAME ) {
23+ project. configurations. create(ScoveragePlugin . CONFIGURATION_NAME ) {
2424 visible = false
2525 transitive = false
26- description = ' SCCT dependencies'
26+ description = ' Scoverage dependencies'
2727 }
2828
29- project. sourceSets. create(ScctPlugin . CONFIGURATION_NAME ) {
29+ project. sourceSets. create(ScoveragePlugin . CONFIGURATION_NAME ) {
3030 def mainSourceSet = project. sourceSets. getByName(SourceSet . MAIN_SOURCE_SET_NAME )
3131
3232 java. source(mainSourceSet. java)
@@ -36,12 +36,12 @@ class ScctExtension {
3636 runtimeClasspath + = mainSourceSet. runtimeClasspath
3737 }
3838
39- project. tasks. create(ScctPlugin . TEST_NAME , Test . class) {
40- dependsOn(project. tasks[ScctPlugin . COMPILE_NAME ])
39+ project. tasks. create(ScoveragePlugin . TEST_NAME , Test . class) {
40+ dependsOn(project. tasks[ScoveragePlugin . COMPILE_NAME ])
4141 }
4242
43- project. tasks. create(ScctPlugin . CHECK_NAME , OverallCheckTask . class) {
44- dependsOn(project. tasks[ScctPlugin . TEST_NAME ])
43+ project. tasks. create(ScoveragePlugin . CHECK_NAME , OverallCheckTask . class) {
44+ dependsOn(project. tasks[ScoveragePlugin . TEST_NAME ])
4545 }
4646
4747 }
@@ -50,27 +50,28 @@ class ScctExtension {
5050
5151 @Override
5252 void execute (Project t ) {
53- t. tasks[ScctPlugin . COMPILE_NAME ]. configure {
54- List<String > plugin = [' -Xplugin:' + t. configurations[ScctPlugin . CONFIGURATION_NAME ]. singleFile]
53+ t. tasks[ScoveragePlugin . COMPILE_NAME ]. configure {
54+ List<String > plugin = [' -Xplugin:' + t. configurations[ScoveragePlugin . CONFIGURATION_NAME ]. singleFile]
5555 List<String > parameters = scalaCompileOptions. additionalParameters
5656 if (parameters != null ) {
5757 plugin. addAll(parameters)
5858 }
5959 scalaCompileOptions. additionalParameters = plugin
6060 // exclude the scala libraries that are added to enable scala version detection
61- classpath + = t. configurations[ScctPlugin . CONFIGURATION_NAME ]
61+ classpath + = t. configurations[ScoveragePlugin . CONFIGURATION_NAME ]
6262 }
63- t. tasks[ScctPlugin . TEST_NAME ]. configure {
64- systemProperty ' scct.report.dir' , " ${ t.buildDir} /reports/${ t.extensions[ScctPlugin.CONFIGURATION_NAME].reportDirName} "
65- systemProperty ' scct.basedir' , " ${ t.rootDir.absolutePath} " // for multi-module checking
63+ t. tasks[ScoveragePlugin . TEST_NAME ]. configure {
64+ // TODO : fix this
65+ systemProperty ' scoverage.report.dir' , " ${ t.buildDir} /reports/${ t.extensions[ScoveragePlugin.CONFIGURATION_NAME].reportDirName} "
66+ systemProperty ' scoverage.basedir' , " ${ t.rootDir.absolutePath} " // for multi-module checking
6667
6768 def existingClasspath = classpath
68- classpath = t. files(t. sourceSets[ScctPlugin . CONFIGURATION_NAME ]. output. classesDir) +
69- project. configurations[ScctPlugin . CONFIGURATION_NAME ] +
69+ classpath = t. files(t. sourceSets[ScoveragePlugin . CONFIGURATION_NAME ]. output. classesDir) +
70+ project. configurations[ScoveragePlugin . CONFIGURATION_NAME ] +
7071 existingClasspath
7172 }
7273 }
7374 }
7475
75- String reportDirName = ' scct '
76- }
76+ String reportDirName = ' scoverage '
77+ }
0 commit comments