-
Notifications
You must be signed in to change notification settings - Fork 30
Migrate from OSSRH to Sonatype Central publishing #915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
1f75ce6
to
893fd68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Will try next release with this publish method. Also hoping the initial wiring of passing library version from project level to module level works all good!
6e20733
to
633e1f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the Android SDK publishing pipeline by migrating from the legacy OSSRH plugin to Sonatype Central via the NMCP Gradle plugin, updating CI steps, and cleaning up deprecated logic.
- Switches
maven-push.gradle
to usecom.gradleup.nmcp
with property-based credentials and automatic publishing - Always applies the shared publishing script in both
iterableapi
anditerableapi-ui
modules - Updates the GitHub Actions workflow to import GPG keys, generate a secret ring, and publish through Sonatype Central
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
maven-push.gradle | Replaced manual OSSRH repo setup with NMCP plugin and property lookups |
iterableapi/build.gradle | Removed conditional guard around apply from: '../maven-push.gradle' |
iterableapi-ui/build.gradle | Same unconditional apply of publishing script |
.github/workflows/publish.yml | Renamed workflow, added branch filter, revamped GPG import/publish steps |
.editorconfig | Added YAML file indentation rules |
Comments suppressed due to low confidence (2)
.github/workflows/publish.yml:8
- GitHub Actions tag filters use glob patterns, not regex. The
+
quantifier won’t work here. Consider a glob like"[0-9]*.[0-9]*.[0-9]*"
or explicit patterns to match version tags.
- "[0-9]+.[0-9]+.[0-9]+*" # Match version tags like 3.5.13, 3.6.0-beta1, etc.
iterableapi/build.gradle:94
- [nitpick] Removing the
hasProperty("mavenPublishEnabled")
guard means the publishing script always loads, which may break local or test builds when credentials are missing. Consider reintroducing a feature flag or graceful no-op handling.
apply from: '../maven-push.gradle'
633e1f7
to
122b010
Compare
122b010
to
4ac7d8c
Compare
cache: gradle | ||
|
||
- name: Import GPG Key | ||
- name: Import GPG Key and Create Secring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is helpful 👍🏼
|
||
- name: Build | ||
run: ./gradlew clean build | ||
- name: Build and Publish to Sonatype Central |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well and clearly named 👍🏼
@@ -16,50 +16,42 @@ | |||
|
|||
apply plugin: 'maven-publish' | |||
apply plugin: 'signing' | |||
apply plugin: 'com.gradleup.nmcp' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, so existing maven-push injection will still work as is with now new plugin. 👌🏼
8fcc497
to
46985c3
Compare
- Switch to gradleup/nmcp plugin for automatic publication - Update GitHub Actions to use SONATYPE_USERNAME/SONATYPE_PASSWORD - Remove manual repository configuration and staging steps - Configure modern GPG signing using global iterable secrets
46985c3
to
f760be3
Compare
🔹 Jira Ticket(s) if any
N/A
✏️ Description
Migrates Android SDK publishing from legacy OSSRH to the new Sonatype Central publishing system using the NMCP plugin. This includes:
The migration maintains backward compatibility while modernizing the publishing infrastructure.