# Configuring Gradle

This page explains how to configure the Gradle package manager to pull packages from the Seal artifact server based on your existing setup.

Make sure you have the access token for the server ready.

### Pull directly from the artifact server using Groovy

1. Open the project's `build.gradle` file under the `app` directory.
2. In the `repositories` section add Seal Security's artifact server. Note that it should replace or be before the built-in servers such as `mavenCentral()` and `google()` as explained [here](/fundamentals/artifact-server/artifact-server-ordering.md). See the following example:

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

3. Open the project's `gradle.properties` file and set the following properties, where `SEAL_TOKEN` stands for your token and `PROJECT_ID` should be the name of your project:

```gradle
sealUser=PROJECT_ID
sealToken=SEAL_TOKEN
```

### Pull using JFrog's Artifactory

1. Go to JFrog's Artifactory configuration and create a new remote Maven repository.
   1. In the Basic configuration, choose whatever Repository Key you like.
   2. In both the URL field set `https://maven.sealsecurity.io`.
   3. In the User Name field use `jfrog`.
   4. In the Password / Access Token field paste the Production token you created earlier.
2. Turn off the Handle Snapshots option.
3. Save the new repository, and set it as the top priority remote repository in the virtual repository you're using.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealsecurity.io/fundamentals/artifact-server/configuring-the-package-manager/configuring-gradle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
