{"id":13605745,"url":"https://github.com/GradleUp/nmcp","last_synced_at":"2025-04-12T05:34:31.626Z","repository":{"id":222032635,"uuid":"756060949","full_name":"GradleUp/nmcp","owner":"GradleUp","description":"New Maven Central Publishing","archived":false,"fork":false,"pushed_at":"2024-08-01T10:10:08.000Z","size":126,"stargazers_count":49,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-02T19:38:21.852Z","etag":null,"topics":[],"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":null,"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}},"created_at":"2024-02-11T21:22:58.000Z","updated_at":"2024-07-28T20:00:34.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":8,"template":false,"template_full_name":null,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223498027,"owners_count":17155243,"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","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":[],"created_at":"2024-08-01T19:01:02.250Z","updated_at":"2024-11-07T10:31:10.942Z","avatar_url":"https://github.com/GradleUp.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Nmcp: New Maven Central Publishing (or New Maven Central Portal too!)\n\nA plugin that uses the new [Central Portal publisher API](https://central.sonatype.org/publish/publish-portal-api/) to publish to Maven Central.\n\nNew accounts created after Feb. 1st 2024 are configured to use the new publishing by default and can use this plugin. Other accounts can continue publishing to OSSRH the usual way.\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\u003e [!NOTE]\n\u003e This project was created as a short term solution and a good learning opportunity. I'm hoping more streamlined solutions will appear in the long run, either\n in [gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin/issues/722) or as [first party](https://github.com/gradle/gradle/issues/28120).\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\").version(\"0.0.8\")\n}\n\nnmcp {\n  publishAllProjectsProbablyBreakingProjectIsolation {\n    username = TODO()\n    password = TODO()\n    // publish manually from the portal\n    publicationType = \"USER_MANAGED\"\n    // or if you want to publish automatically\n    publicationType = \"AUTOMATIC\"\n  }\n}\n```\n\nThen call `publishAllPublicationsToCentralPortal` to publish all your publications:\n\n```\n./gradlew publishAllPublicationsToCentralPortal\n# yay everything is uploaded 🎉\n# go to https://central.sonatype.com/ to release if you used USER_MANAGED\n```\n\n# Project isolation compatible version:\n\n`publishAllProjectsProbablyBreakingProjectIsolation` uses the `allprojects {}` block and might be 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/moduleN/build.gradle.kts\nplugins {\n    id(\"com.gradleup.nmcp\").version(\"0.0.8\")\n}\n\nnmcp {\n  publishAllPublications {}\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\").version(\"0.0.8\")\n}\n\nnmcp {\n    publishAggregation {\n        project(\":module1\")\n        project(\":module2\")\n        project(\":module3\")\n\n        username = TODO()\n        password = TODO()\n        publicationType = \"USER_MANAGED\"\n    }\n}\n```\n\n# Single-module:\n\n```kotlin\nplugins {\n    id(\"com.gradleup.nmcp\").version(\"0.0.8\")\n}\n\n// Create your publications\n\nnmcp {\n    // nameOfYourPublication must point to an existing publication\n    publish(nameOfYourPublication) {\n        username = TODO(\"Create a token at https://central.sonatype.com/account\") \n        password = TODO(\"Create a token at https://central.sonatype.com/account\")\n        // publish manually from the portal\n        publicationType = \"USER_MANAGED\"\n        // or if you want to publish automatically\n        publicationType = \"AUTOMATIC\"\n    }\n}\n```\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"}