Skip to content

Commit 19b9a4b

Browse files
authored
Replace OSSRH with central portal (#193)
1 parent bf4c4c9 commit 19b9a4b

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository -PGPG_SIGNING_REQUIRED -PgithubPackages.user=$GITHUB_ACTOR -PgithubPackages.key=${{ secrets.GITHUB_TOKEN }}
2323

2424
- name: Publish to Sonatype Staging
25-
run: ./gradlew publishAllPublicationsToSonatypeStagingRepository -PGPG_SIGNING_REQUIRED
25+
run: ./gradlew publishAllPublicationsToCentralPortal -PGPG_SIGNING_REQUIRED

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SentryProguardGradlePlugin
22

33
[![CI](https://github.com/ioki-mobility/SentryProguardGradlePlugin/actions/workflows/test-plugin.yml/badge.svg)](https://github.com/ioki-mobility/SentryProguardGradlePlugin/actions/workflows/test-plugin.yml)
4-
[![Maven Central](https://img.shields.io/maven-central/v/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E&color=%233246c8)](https://central.sonatype.com/namespace/com.ioki.sentry.proguard)
5-
[![Snapshot](https://img.shields.io/nexus/s/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E&color=%234f78ff&server=https://s01.oss.sonatype.org)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/ioki/sentry/proguard)
4+
[![Maven Central](https://img.shields.io/maven-central/v/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E&color=%233246c8)](https://central.sonatype.com/namespace/com.ioki.sentry.proguard) <!-- Disabled because of: https://github.com/badges/shields/pull/10997
5+
[![Snapshot](https://img.shields.io/nexus/s/com.ioki.sentry.proguard/sentry-proguard-gradle-plugin?labelColor=%2324292E&color=%234f78ff&server=https://s01.oss.sonatype.org)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/ioki/sentry/proguard) -->
66
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg?labelColor=%2324292E&color=%23d11064)](https://github.com/ioki-mobility/SentryProguardGradlePlugin/blob/main/LICENSE.md)
77

88
A Gradle plugin that generated `UUIDs`, adds it to your `AndroidManifest.xml`
@@ -73,7 +73,7 @@ To use the SNAPSHOT version you have to include the sonatype snapshot repository
7373
```kotlin
7474
pluginManagement {
7575
repositories {
76-
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
76+
maven(url = "https://central.sonatype.com/repository/maven-snapshots")
7777
}
7878
}
7979
```

build.gradle.kts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
`java-gradle-plugin`
55
`maven-publish`
66
signing
7+
alias(libs.plugins.nmcp)
78
}
89

910
repositories {
@@ -89,20 +90,13 @@ publishing {
8990
password = project.findProperty("githubPackages.key") as? String
9091
}
9192
}
92-
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
93+
maven("https://central.sonatype.com/repository/maven-snapshots/") {
9394
name = "SonatypeSnapshot"
9495
credentials {
9596
username = System.getenv("SONATYPE_USER")
9697
password = System.getenv("SONATYPE_PASSWORD")
9798
}
9899
}
99-
maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
100-
name = "SonatypeStaging"
101-
credentials {
102-
username = System.getenv("SONATYPE_USER")
103-
password = System.getenv("SONATYPE_PASSWORD")
104-
}
105-
}
106100
}
107101
}
108102

@@ -118,4 +112,12 @@ signing {
118112
isRequired = hasProperty("GPG_SIGNING_REQUIRED")
119113
if (isRequired) useInMemoryPgpKeys(signingKey, signingPassword)
120114
sign(publishing.publications)
121-
}
115+
}
116+
117+
nmcp {
118+
centralPortal {
119+
username = providers.environmentVariable("SONATYPE_USER")
120+
password = providers.environmentVariable("SONATYPE_PASSWORD")
121+
publishingType = "USER_MANAGED"
122+
}
123+
}

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ test-strikt = "io.strikt:strikt-core:0.35.1"
1111
[plugins]
1212
kotlin = "org.jetbrains.kotlin.jvm:2.1.20"
1313
dokka = "org.jetbrains.dokka:2.0.0"
14+
nmcp = "com.gradleup.nmcp:0.1.4"

0 commit comments

Comments
 (0)