Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.96 KB

README.adoc

File metadata and controls

63 lines (43 loc) · 1.96 KB

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.0.0"
    // 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