name.remal.maven-publish-ossrh

This plugin works only if maven-publish plugin is applied.

The plugin applies name.remal.maven-publish-settings and name.remal.environment-variables plugins.

 

This plugin adds publishing.repositories.ossrh method. This method adds OSSRH Maven repository to publish Maven artifacts to.

SNAPSHOT publishing is supported.

Once the method is invoked, these plugins are applied:

Usage:

publishing.repositories.ossrh {
    credentials.username = "user" // Optional. By default 'OSSRH_USER' or 'OSS_USER' environment variables are used
    credentials.password = "password" // Optional. By default 'OSSRH_PASSWORD' or 'OSS_PASSWORD_USER' environment variables are used
}
import name.remal.gradle_plugins.plugins.publish.ossrh.RepositoryHandlerOssrhExtension
import name.remal.gradle_plugins.dsl.extensions.*

publishing.repositories.convention[RepositoryHandlerOssrhExtension::class.java].ossrh {
    credentials.username = "user" // Optional. By default 'OSSRH_USER' or 'OSS_USER' environment variables are used
    credentials.password = "password" // Optional. By default 'OSSRH_PASSWORD' or 'OSS_PASSWORD_USER' environment variables are used
}