Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions src/includes/getting-started-install/android.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</Note>
8 changes: 8 additions & 0 deletions src/includes/getting-started-install/java.jul.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<Note>

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.

</Note>
8 changes: 8 additions & 0 deletions src/includes/getting-started-install/java.log4j2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<Note>

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.

</Note>
8 changes: 8 additions & 0 deletions src/includes/getting-started-install/java.logback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<Note>

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.

</Note>
2 changes: 2 additions & 0 deletions src/includes/getting-started-install/java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</Note>
2 changes: 2 additions & 0 deletions src/includes/getting-started-install/java.servlet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</Note>
2 changes: 2 additions & 0 deletions src/includes/getting-started-install/java.spring-boot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</Note>
2 changes: 2 additions & 0 deletions src/includes/getting-started-install/java.spring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</Note>
15 changes: 15 additions & 0 deletions src/platforms/android/configuration/bill-of-materials.mdx
Original file line number Diff line number Diff line change
@@ -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
```
43 changes: 43 additions & 0 deletions src/platforms/java/common/configuration/bill-of-materials.mdx
Original file line number Diff line number Diff line change
@@ -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}
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-bom</artifactId>
<version>{{ packages.version('sentry.java', '5.1.0') }}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

Then use dependencies without specifying a version, for example:

```xml {tabTitle:Maven}{filename:pom.xml}
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-logback</artifactId>
</dependency>
```

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
```