{"id":25287531,"url":"https://github.com/gradleup/nmcp","last_synced_at":"2025-07-30T14:34:08.493Z","repository":{"id":222032635,"uuid":"756060949","full_name":"GradleUp/nmcp","owner":"GradleUp","description":"Publish your libraries to the Central Portal","archived":false,"fork":false,"pushed_at":"2025-07-20T20:50:00.000Z","size":665,"stargazers_count":87,"open_issues_count":13,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-20T22:21:23.971Z","etag":null,"topics":["gradle-plugin","kotlin","maven-central","maven-central-portal","publication","sonatype"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GradleUp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-11T21:22:58.000Z","updated_at":"2025-07-20T20:50:02.000Z","dependencies_parsed_at":"2024-06-01T09:40:06.432Z","dependency_job_id":"b2e4d2fa-8540-408d-92cd-d2f150f27015","html_url":"https://github.com/GradleUp/nmcp","commit_stats":null,"previous_names":["gradleup/nmcp"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/GradleUp/nmcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GradleUp%2Fnmcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GradleUp%2Fnmcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GradleUp%2Fnmcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GradleUp%2Fnmcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GradleUp","download_url":"https://codeload.github.com/GradleUp/nmcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GradleUp%2Fnmcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267882863,"owners_count":24160218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle-plugin","kotlin","maven-central","maven-central-portal","publication","sonatype"],"created_at":"2025-02-12T22:39:55.876Z","updated_at":"2025-07-30T14:34:08.479Z","avatar_url":"https://github.com/GradleUp.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"_New accounts created after March 12th 2024 are configured to use the new publishing by default and can use this plugin._\n\n_If your account was created before March 12th 2024, you'll need to either [migrate to the central portal publisher API](https://central.sonatype.org/faq/what-is-different-between-central-portal-and-legacy-ossrh/#process-to-migrate) or [update your url to the Portal OSSRH staging API url](https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/)._\n\n_The date for [OSSRH sunsetting](https://central.sonatype.org/news/20250326_ossrh_sunset/) was June, 30th 2025. The service is now [EOL](https://central.sonatype.org/pages/ossrh-eol/)._\n\n---\n\n# Nmcp: New Maven Central Publishing\n\nA plugin that uses the new [Central Portal publisher API](https://central.sonatype.org/publish/publish-portal-api/) to publish existing publications to Maven Central.\n\n\u003e [!WARNING]\n\u003e Nmcp does **not** create publications or apply the `maven-publish` plugin. This must be done using other means. Nmcp uses existing publications, stages them locally and uploads a zip to the Central Portal publisher API.\n\u003e\n\u003e For a higher level API use [vanniktech/gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin/).\n\n# QuickStart\n\nConfigure `nmcp` in your root project using the quick way:\n\n```kotlin\n// root/build.gradle[.kts]\nplugins {\n  id(\"com.gradleup.nmcp.aggregation\").version(\"1.0.2\")\n}\n\nnmcpAggregation {\n  centralPortal {\n    username = TODO(\"Create a token username at https://central.sonatype.com/account\")\n    password = TODO(\"Create a token password at https://central.sonatype.com/account\")\n    // publish manually from the portal\n    publishingType = \"USER_MANAGED\"\n    // or if you want to publish automatically\n    publishingType = \"AUTOMATIC\"\n  }\n\n  // Publish all projects that apply the 'maven-publish' plugin\n  publishAllProjectsProbablyBreakingProjectIsolation()\n}\n```\n\nCall `publishAggregationToCentralPortal` to publish the aggregation:\n\n```bash\n./gradlew publishAggregationToCentralPortal\n# yay everything is uploaded 🎉\n# go to https://central.sonatype.com/ to release if you used USER_MANAGED\n```\n\nCall `publishAggregationToCentralPortalSnapshots` to publish to the snapshots:\n\n```bash\n./gradlew publishAggregationToCentralPortalSnapshots\n# yay everything is uploaded to \"https://central.sonatype.com/repository/maven-snapshots/\" 🎉\n```\n\n# Project isolation compatible version\n\n`publishAllProjectsProbablyBreakingProjectIsolation()` uses the `allprojects {}` block and is incompatible with [Project-isolation](https://gradle.github.io/configuration-cache/). \n\nYou can be 100% compatible by adding the plugin to each module you want to publish:\n\n```kotlin\n//root/module/build.gradle.kts\nplugins {\n  id(\"com.gradleup.nmcp\").version(\"1.0.2\")\n}\n```\n\nAnd then list all modules in your root project:\n\n```kotlin\n//root/build.gradle.kts\nplugins {\n  id(\"com.gradleup.nmcp.aggregation\").version(\"1.0.2\")\n}\n\nnmcpAggregation {\n  centralPortal {\n    username = TODO(\"Create a token username at https://central.sonatype.com/account\")\n    password = TODO(\"Create a token password at https://central.sonatype.com/account\")\n    publishingType = \"USER_MANAGED\"\n  }\n}\n\ndependencies {\n  // Add all dependencies here \n  nmcpAggregation(project(\":module1\"))\n  nmcpAggregation(project(\":module2\"))\n  nmcpAggregation(project(\":module3\"))\n}\n```\n\nCall `publishAggregationToCentralPortal` to publish the aggregation:\n\n```bash\n./gradlew publishAggregationToCentralPortal\n# yay everything is uploaded 🎉\n# go to https://central.sonatype.com/ to release if you used USER_MANAGED\n```\n\nCall `publishAggregationToCentralPortalSnapshots` to publish to the snapshots:\n\n```bash\n./gradlew publishAggregationToCentralPortalSnapshots\n# yay everything is uploaded to \"https://central.sonatype.com/repository/maven-snapshots/\" 🎉\n```\n\n# All options\n\n```kotlin\n// root/build.gradle[.kts]\nnmcpAggregation {\n  centralPortal {\n    // publish manually from the portal\n    publishingType = \"USER_MANAGED\"\n\n    // Increase the validation timeout to 30 minutes\n    validationTimeout = java.time.Duration.of(30, ChronoUnit.MINUTES)\n    // Disable waiting for validation\n    validationTimeout = java.time.Duration.ZERO\n\n    // Publish automatically once validation is successful\n    publishingType = \"AUTOMATIC\"\n\n    // Increase the publishing timeout to 30 minutes\n    publishingTimeout = java.time.Duration.of(30, ChronoUnit.MINUTES)\n    // Disable waiting for publishing\n    publishingTimeout = java.time.Duration.ZERO\n\n    // Customize the publication name \n    publicationName = \"My Awesome Library version $version\"\n  }\n}\n```\n\n# Inspect the deployment content\n\nThe `nmcpZipAggregation` task is an intermediate task of `publishAggregationToCentralPortal` that generates the ZIP file that is then sent to Maven Central.  \nYou can use this task to inspect the entire content before publishing your project.\n\n```bash\n./gradlew nmcpZipAggregation\n# go to build/nmcp/zip/aggregation.zip\n```\n\n# KDoc\n\nThe API reference is available at https://gradleup.com/nmcp/kdoc/nmcp/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradleup%2Fnmcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgradleup%2Fnmcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradleup%2Fnmcp/lists"}