Skip to content

MavenPublishingCredentials

Lenni0451 edited this page Sep 26, 2024 · 2 revisions

Credentials for publishing can be stored in the gradle.properties file in the root of the project or the global properties file (~/.gradle/gradle.properties).

Reposilite

Reposilite is a easy to use maven server that can be self-hosted. It can be found here.

reposiliteUsername=user
reposilitePassword=123456

Sonatype

Sonatype is a great choice if you don't want to host your own maven server. Some project owners may require you to publish to Sonatype before they will use your library.
An account can be create here. Sonatype enforced the use of a key for publishing instead of using your account password. This key can be created in the user settings.

ossrhUsername=user
ossrhPassword=123456

You can find more information in the official Sonatype documentation here.

Gradle plugin portal

The Gradle plugin portal is used to publish Gradle plugins.
A configuration for this is not included in this template, but can be configured manually if required.
This is the configuration that would need to be added to the gradle.properties file.

gradle.publish.key=123456
gradle.publish.secret=123456
Clone this wiki locally