Skip to content

Commit dc4ed17

Browse files
authored
Merge pull request #2770 from DataDog/nogorodnikov/rum-10626/migrate-android-sdk-publication-to-central-publisher-portal
RUM-10626: Migrate publishing from OSSRH to Central Publisher portal
2 parents 208da2c + 2d06081 commit dc4ed17

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

build.gradle.kts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ allprojects {
4949
nexusPublishing {
5050
this.repositories {
5151
sonatype {
52-
val sonatypeUsername = System.getenv("OSSRH_USERNAME")
53-
val sonatypePassword = System.getenv("OSSRH_PASSWORD")
54-
stagingProfileId.set("378eecbbe2cf9")
52+
val sonatypeUsername = System.getenv("CENTRAL_PUBLISHER_USERNAME")
53+
val sonatypePassword = System.getenv("CENTRAL_PUBLISHER_PASSWORD")
5554
if (sonatypeUsername != null) username.set(sonatypeUsername)
5655
if (sonatypePassword != null) password.set(sonatypePassword)
56+
// see https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-central
57+
// For official documentation:
58+
// staging repo publishing https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
59+
// snapshot publishing https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-via-other-methods
60+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
61+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
5762
}
5863
}
5964
}

ci/pipelines/default-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ stages:
4242
- aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gradle-properties --with-decryption --query "Parameter.Value" --out text >> ./gradle.properties
4343
- export GPG_PRIVATE_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_private_key --with-decryption --query "Parameter.Value" --out text)
4444
- export GPG_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_passphrase --with-decryption --query "Parameter.Value" --out text)
45-
- export OSSRH_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_username --with-decryption --query "Parameter.Value" --out text)
46-
- export OSSRH_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_password --with-decryption --query "Parameter.Value" --out text)
45+
- export CENTRAL_PUBLISHER_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.publishing.central_username --with-decryption --query "Parameter.Value" --out text)
46+
- export CENTRAL_PUBLISHER_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.publishing.central_password --with-decryption --query "Parameter.Value" --out text)
4747
- export GPG_PUBLIC_FINGERPRINT=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_public_key --with-decryption --query "Parameter.Value" --out text | gpg --import --import-options show-only | grep -E -o -e "[A-F0-9]{40}")
4848

4949
# CI IMAGE

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ robolectric = "4.4_r1-robolectric-r2"
6868
androidLint = "31.0.2"
6969

7070
versionsGradlePlugin = "0.46.0"
71-
nexusPublishGradlePlugin = "1.1.0"
71+
nexusPublishGradlePlugin = "2.0.0"
7272
datadogPlugin = "1.18.0"
7373

7474
kotlinPoet = "1.14.2"

0 commit comments

Comments
 (0)