Skip to content

a gradle plugin that publish gradle project to sonatype

Notifications You must be signed in to change notification settings

medivh-project/medivh-publisher

Repository files navigation

Medivh-Publish

GitHub Readme Stats

Languages: 中文文档 | English

Medivh-publisher is a Gradle plugin designed to publish Gradle projects to the Maven Central Repository. This plugin allows you to perform a complete publication without needing to consult any official documentation.

Requirements

There are two private configurations that every publisher must have.

  • Sonatype Token 📄 - This is a username and password that is used to authenticate the user when uploading the artifacts to the Maven Central Repository.

  • GPG 🔑 - This is a private key that is used to sign the artifacts that are uploaded to the Maven Central Repository.

Quick Start

⚠️ Check the requirements before proceeding.

Please ensure that you have the required configurations before proceeding. This means that you can get five attributes from gradle.
- signing.keyId
- signing.password
- signing.secretKeyRingFile
- sonatypeUsername
- sonatypePassword

Use

In your build.gradle.kts file, add the following code:

plugins {
    id("tech.medivh.plugin.publisher") version "1.2.1"
    // other plugin ...
}

😺 That’s right, you read that correctly. Other than tech.medivh.plugin.publisher, you don’t need to include any other plugins.

Open your terminal and execute:

./gradlew uploadToSonatype

😺 Exactly, you don’t even need any configuration.

You will see the following output in Sonatype:

publish complete

Document

For more advanced configurations and principles, see the Document

About

a gradle plugin that publish gradle project to sonatype

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages