> For the complete documentation index, see [llms.txt](https://docs.sealsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealsecurity.io/setup-apps-os/artifact-server/configuring-package-managers/gradle.md).

# Configuring Gradle

Gradle's repository configuration lives in `build.gradle` (or `build.gradle.kts` for Kotlin DSL). Credentials are read from `gradle.properties` or environment variables.

## Configuration

### Step 1: Add the repository to `build.gradle`

In the `repositories` block of the project's (or app's) `build.gradle`, add the Seal Artifact Server. Place it before built-in remotes like `mavenCentral()` and `google()` so Gradle consults it first:

```gradle
repositories {
    maven {
        credentials {
            username "$sealUser"
            password "$sealToken"
        }
        url "https://maven.sealsecurity.io"
    }
    mavenCentral()
    google()
}
```

The `$sealUser` and `$sealToken` references resolve against project properties.

### Step 2: Provide the credentials

Add the properties to `gradle.properties` in the project root:

```properties
sealUser=<project-id>
sealToken=<token>
```

For CI, set the same properties as environment variables (`ORG_GRADLE_PROJECT_sealUser` and `ORG_GRADLE_PROJECT_sealToken`) rather than committing the token to source.

## Verify

A clean build that resolves at least one dependency pulls from `https://maven.sealsecurity.io/`. Use `gradle dependencies --info` to see the resolved-from URL if you want to confirm explicitly.

## Related

* [Editing dependency files manually](/using-platform/working-with-seal-apps/artifact-server/gradle.md): the JVM-ecosystem version-pinning patterns, including `resolutionStrategy.force` for transitive overrides in Gradle.
* [Configuring Maven](/setup-apps-os/artifact-server/configuring-package-managers/maven.md): the JVM-ecosystem equivalent for Maven builds.
