This document provides the steps to publish the Unified SDK Android to the maven repository.
-
Create an account Maven Central Repository, DO NOT use Social Login, use your
pingidentity
email. -
Then create a support ticket to Central-Support and request access to the
com.pingidentity
namespace. -
Central Team will request you get approval from the
Ping Identity
existing publisher. Get approval from the existing publisher, and response the ticket. -
Generate GPG Key
gpg --gen-key
-
List the GPG Key
OSS_SIGNING_KEY_ID
gpg --list-keys --keyid-format short
The output will be like this:
pub rsa3072/148C566E 2024-07-29 [SC] [expires: 2026-07-29] D1D6B2768620AC372617957441DC92EC148C566E uid [ultimate] andy.witrisna <andy.witrisna@pingidentity.com> sub rsa3072/70DE30A2 2024-07-29 [E] [expires: 2026-07-29]
From above example:
148C566E
is theOSS_SIGNING_KEY_ID
. -
Get the staging profile id
OSS_STAGING_PROFILE_ID
, go to Sonatype Staging Profile, click oncom.pingidentity
and get theProfile ID
from the urlhttps://oss.sonatype.org/#stagingProfiles;<OSS_STAGING_PROFILE_ID>
-
Generate base64 gpg key (OSS_SIGNING_KEY)
gpg --export-secret-keys <OSS_SIGNING_KEY_ID> | base64
-
Setup Environment Variables
export RELEASE_TAG_NAME=<Release SDK version, suffix with -SNAPSHOT for snapshot version> export OSS_STAGING_PROFILE_ID=<Profile ID, Step 6 above> export OSS_USERNAME=<User Token Id> export OSS_PASSWORD=<User Token> export OSS_SIGNING_KEY_ID=<Signing key id, Step 5 above> export OSS_SIGNING_PASSWORD=<Signing key password> export OSS_SIGNING_KEY=<Base64 encoded signing key, Step 7 above>
Note:
OSS_USERNAME
andOSS_PASSWORD
are theUser Token
generated from theMaven Central Repository
account. Refer to the Generate Token for more information. -
Publish
-
For local maven (
~/.m2/repository/com/pingidentity/sdks/
)./gradlew publishToMavenLocal
-
For staging repository (Once downloaded, it stored in
~/.gradle/caches/modules-2/files-2.1/com.pingidentity.sdks/<module>/<version>
)./gradlew --no-configuration-cache publishToSonatype
For version with suffix
-SNAPSHOT
, the version will be published to thesnapshot
repository.For version without suffix
-SNAPSHOT
, the version will be published to thestaging
repository.
-
-
Close and Release the staging repository
To use the Unified SDK Android, add the following dependency to your build.gradle.kts
file:
//implementation(project(":davinci"))
implementation("com.pingidentity.sdks:davinci:0.9.0-SNAPSHOT")
You may want to use the local maven OR snapshot repository to test the SDK before publishing to the maven repository.
In the settings.gradle.kts
file, configure which repository to use:
dependencyResolutionManagement {
repositories {
mavenLocal() //For Local Maven
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") //For Snapshot Repository
}
}
}