This is an unofficial gradle plugin to upload artifacts to Sonatype Central Repository.
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
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.
}
./gradlew sonatypeCentralUpload
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details