From 092d1bb5233484abb05b67963b576bd0299183a4 Mon Sep 17 00:00:00 2001 From: Rob Oxspring Date: Fri, 28 Mar 2025 12:55:32 +0000 Subject: [PATCH] [TG-22877] Document recommended scopes --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index e4bfa3a..f625a95 100644 --- a/README.md +++ b/README.md @@ -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: + +``` + + + com.diffblue.cover + cover-annotations + 1.3.0 + provided + + +``` + +### 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.