eriksencosta / SonatypeCentralUpload

A gradle plugin to upload artifacts to Sonatype Central

Home Page:https://plugins.gradle.org/plugin/cl.franciscosolis.sonatype-central-upload

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SonatypeCentralUpload

This is an unofficial gradle plugin to upload artifacts to Sonatype Central Repository.

Usage

1. Add the plugin to your buildscript

Groovy:

plugins {
    id 'cl.franciscosolis.sonatype-central-upload' version '1.0.0'
}

Kotlin:

plugins {
    id("cl.franciscosolis.sonatype-central-upload") version "1.0.0"
}

Here's the id for quick copy-paste (yup I also struggle with this):

cl.franciscosolis.sonatype-central-upload

2. Configure the plugin

Groovy:

sonatypeCentralUpload {
    username = "your-username"                      // This is your Sonatype generated username
    password = "your-password"                      // This is your sonatype generated password
    
    archives = files(/*...*/)                       // This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
    pom = file("path/to/pom.xml")                   // This is the pom file to upload. This is required by central
    
    signingKey = "--BEGIN PGP PRIVATE KEY BLOCK--"  // This is your PGP private key. This is required to sign your files
    signingKeyPassphrase = "..."                    // This is your PGP private key passphrase (optional) to decrypt your private key
    publicKey = "--BEGIN PGP PUBLIC KEY BLOCK--"    // This is your PGP public key (optional). To distribute later to verify your deployments.
}

Kotlin:

sonatypeCentralUpload {
    username = "your-username"                         // This is your Sonatype generated username
    password = "your-password"                         // This is your sonatype generated password
    
    archives = files(/*...*/)                          // This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
    pom = file("path/to/pom.xml")                      // This is the pom file to upload. This is required by central
    
    signingKey = "--BEGIN PGP PRIVATE KEY BLOCK--"     // This is your PGP private key. This is required to sign your files
    signingKeyPassphrase = "..."                       // This is your PGP private key passphrase (optional) to decrypt your private key
    publicKey = "--BEGIN PGP PUBLIC KEY BLOCK--"       // This is your PGP public key (optional). To distribute later to verify your deployments.
}

3. Run the task

./gradlew sonatypeCentralUpload

License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details

About

A gradle plugin to upload artifacts to Sonatype Central

https://plugins.gradle.org/plugin/cl.franciscosolis.sonatype-central-upload

License:GNU General Public License v3.0


Languages

Language:Kotlin 100.0%