diff --git a/src/includes/getting-started-install/android.mdx b/src/includes/getting-started-install/android.mdx index 6837e66370757a..92150817edba43 100644 --- a/src/includes/getting-started-install/android.mdx +++ b/src/includes/getting-started-install/android.mdx @@ -26,4 +26,6 @@ dependencies { Sentry's Android SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/android/configuration/bill-of-materials) to avoid specifying the version of each dependency. + diff --git a/src/includes/getting-started-install/java.jul.mdx b/src/includes/getting-started-install/java.jul.mdx index 785a8cdf7e7033..327ebb539eb016 100644 --- a/src/includes/getting-started-install/java.jul.mdx +++ b/src/includes/getting-started-install/java.jul.mdx @@ -15,3 +15,11 @@ libraryDependencies += "io.sentry" % "sentry-jul" % "{{ packages.version('sentry ``` For other dependency managers, see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-jul). + + + +Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. + +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + + diff --git a/src/includes/getting-started-install/java.log4j2.mdx b/src/includes/getting-started-install/java.log4j2.mdx index 6d26450f6f7c8a..cd8d82096defc9 100644 --- a/src/includes/getting-started-install/java.log4j2.mdx +++ b/src/includes/getting-started-install/java.log4j2.mdx @@ -15,3 +15,11 @@ libraryDependencies += "io.sentry" % "sentry-log4j2" % "{{ packages.version('sen ``` For other dependency managers see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-log4j2). + + + +Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. + +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + + diff --git a/src/includes/getting-started-install/java.logback.mdx b/src/includes/getting-started-install/java.logback.mdx index d9345211924479..d5b12cd41812c6 100644 --- a/src/includes/getting-started-install/java.logback.mdx +++ b/src/includes/getting-started-install/java.logback.mdx @@ -15,3 +15,11 @@ libraryDependencies += "io.sentry" % "sentry-logback" % "{{ packages.version('se ``` For other dependency managers, see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-logback). + + + +Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. + +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + + diff --git a/src/includes/getting-started-install/java.mdx b/src/includes/getting-started-install/java.mdx index 7ef6d7dc8daa66..c6b72a4832915a 100644 --- a/src/includes/getting-started-install/java.mdx +++ b/src/includes/getting-started-install/java.mdx @@ -26,4 +26,6 @@ libraryDependencies += "io.sentry" % "sentry" % "{{ packages.version('sentry.jav Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + diff --git a/src/includes/getting-started-install/java.servlet.mdx b/src/includes/getting-started-install/java.servlet.mdx index 7a28516117590b..8a40076c065a50 100644 --- a/src/includes/getting-started-install/java.servlet.mdx +++ b/src/includes/getting-started-install/java.servlet.mdx @@ -22,4 +22,6 @@ For other dependency managers, see the [central Maven repository](https://search Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + diff --git a/src/includes/getting-started-install/java.spring-boot.mdx b/src/includes/getting-started-install/java.spring-boot.mdx index 32152b3e91704d..d580e8033b92e2 100644 --- a/src/includes/getting-started-install/java.spring-boot.mdx +++ b/src/includes/getting-started-install/java.spring-boot.mdx @@ -14,4 +14,6 @@ implementation 'io.sentry:sentry-spring-boot-starter:{{ packages.version('sentry Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + diff --git a/src/includes/getting-started-install/java.spring.mdx b/src/includes/getting-started-install/java.spring.mdx index 18ee1001dc8587..c255c094236445 100644 --- a/src/includes/getting-started-install/java.spring.mdx +++ b/src/includes/getting-started-install/java.spring.mdx @@ -20,4 +20,6 @@ For other dependency managers see the [central Maven repository](https://search. Sentry's Java SDK depends on [Gson](https://github.com/google/gson) as a transitive dependency; the minimum required version is 2.7. +If you are using multiple Sentry dependencies, you can add a [bill of materials](/platforms/java/configuration/bill-of-materials) to avoid specifying the version of each dependency. + diff --git a/src/platforms/android/configuration/bill-of-materials.mdx b/src/platforms/android/configuration/bill-of-materials.mdx new file mode 100644 index 00000000000000..ddbf3cc6638e9d --- /dev/null +++ b/src/platforms/android/configuration/bill-of-materials.mdx @@ -0,0 +1,15 @@ +--- +title: Using a BOM +description: "Learn more about using a bill of materials with multiple Sentry dependencies." +sidebar_order: 1000 +--- + +When you are using multiple Sentry dependencies, you can avoid specifying the version of each dependency with a *BOM* or *Bill Of Materials*. + +Using Gradle 5.0 or higher, you can add the following to the `dependencies` section in your `build.gradle`: + +```groovy {filename:build.gradle} +implementation platform('io.sentry:sentry-bom:{{ packages.version('sentry.java', '5.1.0') }}') //import bom +implementation('io.sentry:sentry-android') //no version specified +implementation('io.sentry:sentry-android-fragment') //no version specified +``` diff --git a/src/platforms/java/common/configuration/bill-of-materials.mdx b/src/platforms/java/common/configuration/bill-of-materials.mdx new file mode 100644 index 00000000000000..bca250ba19d222 --- /dev/null +++ b/src/platforms/java/common/configuration/bill-of-materials.mdx @@ -0,0 +1,43 @@ +--- +title: Using a BOM +sidebar_order: 1000 +--- + +When you are using multiple Sentry dependencies, you can avoid specifying the version of each dependency with a *BOM* or *Bill Of Materials*. + +Using Maven, add the following to the `dependencyManagement` section in your `pom.xml`: + +```xml {tabTitle:Maven}{filename:pom.xml} + + + + io.sentry + sentry-bom + {{ packages.version('sentry.java', '5.1.0') }} + pom + import + + + +``` + +Then use dependencies without specifying a version, for example: + +```xml {tabTitle:Maven}{filename:pom.xml} + + io.sentry + sentry + + + io.sentry + sentry-logback + +``` + +Using Gradle 5.0 or higher, you can add the following to the `dependencies` section in your `build.gradle`: + +```groovy {filename:build.gradle} +implementation platform('io.sentry:sentry-bom:{{ packages.version('sentry.java', '5.1.0') }}') //import bom +implementation('io.sentry:sentry') //no version specified +implementation('io.sentry:sentry-logback') //no version specified +```