> For the complete documentation index, see [llms.txt](https://result.leakyabstractions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://result.leakyabstractions.com/extra/bom.md).

# Bill of Materials

How to declare dependencies without having to worry about version numbers

Tracking multiple add-on versions for your project can quickly become cumbersome. In that situation, you can use the convenient [Result Library Bill of Materials](https://github.com/LeakyAbstractions/result-bom) to centralize and align their versions. This ensures compatibility and simplifies dependency maintenance.

{% hint style="info" %}
[Maven](https://maven.apache.org/)'s Bill of Materials POMs are special POM files that group dependency versions known to be valid and tested to work together, reducing the chances of having version mismatches.
{% endhint %}

The basic idea is that instead of specifying a version number for each Result library in your project, you can use this BOM to get a complete set of consistent versions.

## How to Use this Add-On

Add this Maven dependency to your build:

| Group ID                | Artifact ID  | Latest Version                                                                                    |
| ----------------------- | ------------ | ------------------------------------------------------------------------------------------------- |
| `com.leakyabstractions` | `result-bom` | ![](https://img.shields.io/endpoint?url=https://dev.leakyabstractions.com/result-bom/latest.json) |

### Maven

To [import the BOM using Maven](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms), use the following:

```xml
<!-- Import the BOM -->
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.leakyabstractions</groupId>
      <artifactId>result-bom</artifactId>
      <version>1.0.0.0</version>
      <scope>import</scope>
      <type>pom</type>
    </dependency>
  </dependencies>
</dependencyManagement>

<!-- Define dependencies without version numbers -->
<dependencies>
  <dependency>
    <groupId>com.leakyabstractions</groupId>
    <artifactId>result</artifactId>
  </dependency>
  <dependency>
    <groupId>com.leakyabstractions</groupId>
    <artifactId>result-assertj</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>
```

### Gradle

To [import the BOM using Gradle](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import), use the following:

```groovy
dependencies {
  // Import the BOM
  implementation platform("com.leakyabstractions:result-bom:1.0.0.0")

  // Define dependencies without version numbers
  implementation("com.leakyabstractions:result")
  testImplementation("com.leakyabstractions:result-assertj")
}
```

## Conclusion

We discussed the benefits of using the Bill of Materials for managing dependencies in your project. With the BOM, you can eliminate the hassle of manually specifying version numbers, ensuring consistency and compatibility across all Result libraries.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://result.leakyabstractions.com/extra/bom.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
