Skip to content

Commit 4a27e91

Browse files
authored
Merge pull request #22 from diffblue/roxspring/TG-22877
[TG-22877] Document recommended scopes
2 parents 9d19095 + 092d1bb commit 4a27e91

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,33 @@ In turn this can be used by [Diffblue Cover](https://diffblue.com/cover) to tune
1515
Cover Annotations is published in the [Maven central repository](https://central.sonatype.com/artifact/com.diffblue.cover/cover-annotations/overview).
1616
In order to use the annotations simply add `cover-annotations` as a dependency to your project, for example copying the snippet for Maven or Gradle from the repository page.
1717

18+
### Maven
19+
20+
For installation into a Maven project the `provided` scope is recommended so that the annotations are available at compile and test time, but are not bundled with the project output:
21+
22+
```
23+
<dependencies>
24+
<dependency>
25+
<groupId>com.diffblue.cover</groupId>
26+
<artifactId>cover-annotations</artifactId>
27+
<version>1.3.0</version>
28+
<scope>provided</scope>
29+
</dependency>
30+
</dependencies>
31+
```
32+
33+
### Gradle
34+
35+
For installation into a Gradle project the `compileOnly` and `testImplementation` configurations are recommended so that the annotations are available at compile and test time, but are not bundled with the project output:
36+
37+
```
38+
dependencies {
39+
compileOnly("com.diffblue.cover:cover-annotations:1.3.0")
40+
41+
testImplementation("com.diffblue.cover:cover-annotations:1.3.0")
42+
}
43+
```
44+
1845
## Usage
1946

2047
Annotations placed on packages affect tests for all classes and methods under test in that package.

0 commit comments

Comments
 (0)