# Adding Result to Your Build

This library adheres to [Pragmatic Versioning](https://pragver.github.io/) to communicate the backwards compatibility of each version.

The latest releases are available in [![Maven Central repository](https://137539276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfavUYGNGvzkCicVu3-%2Fuploads%2Fqd6vaHXTniswjBwTNygy%2Flogo-maven-central.svg?alt=media\&token=98f2c79a-1560-4182-b643-d91f2a1bd696)](https://central.sonatype.com/artifact/com.leakyabstractions/result/)

Result supports both [**Maven**](https://maven.apache.org/) and [**Gradle**](https://gradle.org/) for seamless integration into your Java build workflow.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-cover-dark data-type="image">Cover image (dark)</th></tr></thead><tbody><tr><td><a href="https://maven.apache.org/"><strong>Apache Maven</strong></a> is a convention-based Java build tool that uses XML configuration to manage dependencies, compile code, and package applications in a standardized lifecycle.</td><td><a href="#maven">#maven</a></td><td data-object-fit="contain"><a href="https://137539276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfavUYGNGvzkCicVu3-%2Fuploads%2FMi2S8tFmj71pETLI3y1q%2Flogo-maven.svg?alt=media&#x26;token=06775086-fc8c-473b-82ce-6ce94c4d69ad">logo-maven.svg</a></td><td><a href="https://137539276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfavUYGNGvzkCicVu3-%2Fuploads%2Fxif2fN7yx1BMJqu9vaS8%2Flogo-maven.dark.svg?alt=media&#x26;token=a93c4b41-233e-452b-9856-14e3915f9807">logo-maven.dark.svg</a></td></tr><tr><td><a href="https://gradle.org/"><strong>Gradle</strong></a> is a flexible and high-performance build tool that uses a Groovy or Kotlin DSL to define builds, offering advanced customization and fast incremental builds.</td><td><a href="#gradle">#gradle</a></td><td data-object-fit="contain"><a href="https://137539276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfavUYGNGvzkCicVu3-%2Fuploads%2FLB7k99sphYsbAP8dv3jU%2Flogo-gradle.svg?alt=media&#x26;token=c0af3fa4-e390-4f58-9527-213f083ea564">logo-gradle.svg</a></td><td><a href="https://137539276-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfavUYGNGvzkCicVu3-%2Fuploads%2FYGExjPQG6IqBloETpgOD%2Flogo-gradle.dark.svg?alt=media&#x26;token=6a5f1e6f-3e8f-4d03-affc-6b980140cc3c">logo-gradle.dark.svg</a></td></tr></tbody></table>

## Artifact Coordinates

Add this Maven dependency to your build:

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

{% hint style="success" %}
[Maven Central](https://central.sonatype.com/artifact/com.leakyabstractions/result/) provides snippets for different build tools to declare this dependency.
{% endhint %}

## Maven

Add Result as a Maven dependency to your project.

```xml
<dependencies>
    <dependency>
        <groupId>com.leakyabstractions</groupId>
        <artifactId>result</artifactId>
        <version>1.0.0.0</version>
    </dependency>
</dependencies>
```

## Gradle

Add Result as a Gradle dependency to your project.

```groovy
dependencies {
    implementation("com.leakyabstractions:result:1.0.0.0")
}
```

{% hint style="info" %}
This is the most common configuration for projects using Result internally. If we were building a library that exposed Result in its public API, [we should use `api` instead of `implementation`](https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation).
{% endhint %}

## Conclusion

We learned how to add the library to your project using either Maven or Gradle. By including the correct dependencies, you're now ready to start leveraging the power of Results in your applications.
