Skip to content

PaystackHQ/publish-mavencentral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

publish-mavencentral

Usage

Apply script

At the bottom of the build.gradle file in each module

apply from: "https://raw.githubusercontent.com/PaystackHQ/publish-mavencentral/main/maven-publish.gradle"

Define library details

In project-level gradle.properties file

# Replace these with the relevant values

GROUP=co.paystack.android.whatever
VERSION_NAME=1.0.0

POM_DESCRIPTION=Library description

POM_URL=https://github.com/PaystackHQ/library-uri
POM_SCM_URL=https://github.com/PaystackHQ/library-uri
POM_SCM_CONNECTION=scm:git:github.com/PaystackHQ/library-uri.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com/PaystackHQ/library-uri.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=paystack
POM_DEVELOPER_NAME=Paystack
POM_DEVELOPER_EMAIL[email protected]

In each library module's gradle.properties file (create one if it doesn't exist)

# Replace these with the relevant values

POM_ARTIFACT_ID=artifactid
POM_NAME=Library name
POM_PACKAGING=aar

Define secrets

This step is only important when submitting artifacts to the maven central repository. These values will be read from system environment variables if local.properties doesn't exist. Useful in CI environments.

Artifact signing credentials

In local.properties file

signing.keyId=insert_signing_key_id
signing.password=insert_signing_key_password_here
signing.secretKeyRingFile=/path/to/secretkey/file,gpg

Sonatype OSSRH credentials

In local.properties file

ossrhUsername=insert_ossrh_username
ossrhPassword=insert_ossrh_password

About

Scripts for publishing Android artifacts to MavenCentral

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published