Skip to content

Commit e5e0e90

Browse files
committed
Update README.md with release history and instructions on how to migrate to 3.x
1 parent ea988ae commit e5e0e90

File tree

1 file changed

+53
-10
lines changed

1 file changed

+53
-10
lines changed

README.md

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ gradle-scoverage
44
================
55
A plugin to enable the use of Scoverage in a gradle Scala project.
66

7-
Getting started
8-
---------------
7+
Usage
8+
-----
99

10-
http://plugins.gradle.org/plugin/org.scoverage
10+
You can find instructions on how to apply the plugin at: http://plugins.gradle.org/plugin/org.scoverage
1111

12-
Available tasks
13-
---------------
12+
### Available tasks
1413

1514
1. `reportScoverage`: Produces XML and HTML reports for analysing test code coverage.
1615

@@ -29,8 +28,7 @@ Available tasks
2928
`gradle checkScoverage` will automatically invoke `reportScoverage` but it won't generate aggregated reports.
3029
In order to check coverage of aggregated reports one should use `gradle checkScoverage aggregateScoverage`.
3130

32-
Configuration
33-
-------------
31+
### Configuration
3432

3533
The plugin exposes multiple options that can be configured by setting them in an `scoverage` block within the project's
3634
build script. These options are as follows:
@@ -58,13 +56,58 @@ required for the validation to pass (otherwise `checkScoverage` will fail the bu
5856
`checkScoverage` task. For more information on the different types, please refer to the documentation of the scalac
5957
plugin (https://github.com/scoverage/scalac-scoverage-plugin).
6058

61-
Run without normal compilation
62-
------------------------------
59+
### Run without normal compilation
6360

6461
By default, running any of the plugin tasks will compile the code both using "normal" compilation (`compileScala`)
6562
and using the scoverage scalac plugin (`compileScoverageScala`).
6663

6764
In cases where you only wish to generate reports / validate coverage, but are not interested in publishing the code,
6865
it is possible to only compile the code with the scoverage scalac plugin, thus reducing build times significantly.
6966
In order to do so, simply add the arguments `-x compileScala` to the gradle execution.
70-
For example: `gradle reportScoverage -x compileScala`.
67+
For example: `gradle reportScoverage -x compileScala`.
68+
69+
Migration to 3.x
70+
----------------
71+
72+
* No more `testScoverage` task; instead, `test` will run coverage whenever the build is invoked with any of the scoverage tasks.
73+
74+
* No more need to declare scalac dependencies:
75+
```groovy
76+
// can safely delete this from build scripts
77+
dependencies {
78+
scoverage group: 'org.scoverage', name: 'scalac-scoverage-plugin_2.12', version: '1.3.1'
79+
scoverage group: 'org.scoverage', name: 'scalac-scoverage-runtime_2.12', version: '1.3.1'
80+
}
81+
```
82+
83+
* All configurations are configured in `scoverage` block. For instance:
84+
```groovy
85+
// do this
86+
scoverage {
87+
minimumRate = 0.5
88+
}
89+
90+
// instead of this
91+
checkScoverage {
92+
minimumRate = 0.5
93+
}
94+
```
95+
96+
* No more need to declare aggregation task:
97+
```groovy
98+
// can safely delete this from build scripts
99+
task aggregateScoverage(type: org.scoverage.ScoverageAggregate)
100+
checkScoverage {
101+
reportDir = file("$buildDir/scoverage-aggregate")
102+
}
103+
```
104+
105+
Release history
106+
---------------
107+
108+
##### (not released yet) - 3.0.0
109+
110+
* Auto resolution of scalac plugin dependencies.
111+
* Aggregation task declared by default.
112+
* Deletion of non-instrumented classes, allowing for better integration with other coverage tools such as cobertura.
113+
* Ability to execute coverage without "normal" compilation, thus reducing build times.

0 commit comments

Comments
 (0)