Repolode
vanniktech

vanniktech/gradle-maven-publish-plugin

A Gradle plugin that publishes Java, Kotlin and Android libraries, with sources and javadoc, to Maven Central or other Nexus repositories.

Stars
1,749
Forks
139
Open issues
68
Last commit
yesterday

What is it?

gradle-maven-publish-plugin adds a publish task to Gradle builds so that Java, Kotlin and Android libraries can be uploaded to Maven Central or any other Maven repository. It handles sources and javadoc artifacts and covers a range of project types, including Android libraries, Kotlin Multiplatform, Gradle plugins, java-platform and version catalogs.

The plugin configures publishing automatically for each project type, so developers do not need to learn the publishing details of AGP or the Kotlin Multiplatform plugin. It also provides dedicated APIs for Maven Central setup, including automatic release without using the web interface, and supports in-memory GPG signing configured through environment variables, which suits CI pipelines.

It is a fork-style continuation of Chris Banes' original gradle-mvn-push plugin, extended with Kotlin support and kept up to date with recent Gradle and Android changes.

Key features

  • 01Publishes Java, Kotlin, Android and Kotlin Multiplatform libraries to Maven repositories.
  • 02Generates and attaches sources and javadoc artifacts.
  • 03Provides APIs for Maven Central setup and automatic release.
  • 04Signs artifacts with in-memory GPG keys set through environment variables.
  • 05Configures publishing through Gradle properties that apply to all subprojects.

Use cases

  • Publishing an open-source Android or Kotlin library to Maven Central.
  • Releasing a Gradle plugin or version catalog to a private Nexus instance.
  • Automating library releases from CI with GPG signing.
  • Publishing a multi-module project that mixes Android, JVM and multiplatform modules.

Quick start

  1. 1

    Follow the Maven Central setup guide in the docs

In collections

Topics

FAQ

What is gradle-maven-publish-plugin?
A Gradle plugin that publishes Java, Kotlin and Android libraries, with sources and javadoc, to Maven Central or other Nexus repositories. gradle-maven-publish-plugin adds a publish task to Gradle builds so that Java, Kotlin and Android libraries can be uploaded to Maven Central or any other Maven repository. It handles sources and javadoc artifacts and covers a range of project types, including Android libraries, Kotlin Multiplatform, Gradle plugins, java-platform and version catalogs.
Is gradle-maven-publish-plugin free to use? What license does it have?
gradle-maven-publish-plugin is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is gradle-maven-publish-plugin still maintained?
Actively maintained. The last commit to gradle-maven-publish-plugin was on Nov 5, 2026.
What can I use gradle-maven-publish-plugin for?
Publishing an open-source Android or Kotlin library to Maven Central. Releasing a Gradle plugin or version catalog to a private Nexus instance. Automating library releases from CI with GPG signing. Publishing a multi-module project that mixes Android, JVM and multiplatform modules.
How do I install gradle-maven-publish-plugin?
Follow the Maven Central setup guide in the docs
Where can I get gradle-maven-publish-plugin?
The source code and installation instructions are on GitHub: https://github.com/vanniktech/gradle-maven-publish-plugin

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects