Skip to content

[TG-22877] Document recommended scopes #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,33 @@ In turn this can be used by [Diffblue Cover](https://diffblue.com/cover) to tune
Cover Annotations is published in the [Maven central repository](https://central.sonatype.com/artifact/com.diffblue.cover/cover-annotations/overview).
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.

### Maven

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:

```
<dependencies>
<dependency>
<groupId>com.diffblue.cover</groupId>
<artifactId>cover-annotations</artifactId>
<version>1.3.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
```

### Gradle

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:

```
dependencies {
compileOnly("com.diffblue.cover:cover-annotations:1.3.0")

testImplementation("com.diffblue.cover:cover-annotations:1.3.0")
}
```

## Usage

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