MavenPublishBaseExtension

abstract class MavenPublishBaseExtension @Inject constructor(project: Project, buildEventsListenerRegistry: BuildEventsListenerRegistry, buildFeatures: BuildFeatures)

Constructors

Link copied to clipboard
@Inject
constructor(project: Project, buildEventsListenerRegistry: BuildEventsListenerRegistry, buildFeatures: BuildFeatures)

Functions

Link copied to clipboard
fun configure(platform: Platform)

Configures a Platform which will automatically set up the artifacts that should get published, including javadoc and sources jars depending on the option.

Link copied to clipboard
@Incubating
fun configureBasedOnAppliedPlugins(sourcesJar: Boolean = true, javadocJar: Boolean = true)

Calls configure with a Platform chosen based on other applied Gradle plugins.

Link copied to clipboard
fun coordinates(groupId: String? = null, artifactId: String? = null, version: String? = null)

Set the Maven coordinates consisting of groupId, artifactId and version for this project. In the case of Kotlin Multiplatform projects the given artifactId is used together with the platform targets resulting in artifactIds like [artifactId]-jvm.

Link copied to clipboard
fun pom(configure: Action<in MavenPom>)

Configures the POM that will be published.

Link copied to clipboard
@Incubating
fun pomFromGradleProperties()

Configures the POM through Gradle properties.

Link copied to clipboard
fun publishToMavenCentral(automaticRelease: Boolean = false, validateDeployment: Boolean = true)

Sets up Maven Central publishing through Sonatype OSSRH by configuring the target repository. Gradle will then automatically create a publishAllPublicationsToMavenCentralRepository task as well as include it in the general publish task.

Link copied to clipboard

Automatically apply Gradle's signing plugin and configure all publications to be signed. If signing credentials are not configured this will fail the build unless the current version is a SNAPSHOT.