Configuring Gradle
Point Gradle at the Seal Artifact Server using build.gradle and gradle.properties.
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:
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:
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: the JVM-ecosystem version-pinning patterns, including
resolutionStrategy.forcefor transitive overrides in Gradle.Configuring Maven: the JVM-ecosystem equivalent for Maven builds.
Last updated