Releases: vanniktech/gradle-maven-publish-plugin
0.34.0
- Added configuration cache support for publishing.
- Removed support for publishing through Sonatype OSSRH since it has been shut down. See the
0.33.0 release notes for upgrade
instructions if you haven't upgraded yet.SonatypeHosthas been removed from the DSL.SONATYPE_HOSTonly supportsCENTRAL_PORTALnow. It's recommended to use the following properties instead:mavenCentralPublishing=truereplacesSONATYPE_HOST=CENTRAL_PORTAL.mavenCentralAutomaticPublishing=truereplacesSONATYPE_AUTOMATIC_RELEASE=true.
- Update the Central Portal Publisher APIs to the latest.
- It's now possible to mix SNAPSHOT versions and release versions when running
publishtasks. - Fixed Gradle's deprecation warning caused by invalid URI.
- Fixed check for the minimum supported Gradle version running too late in some cases.
Thanks to @Goooler and @solrudev for their contributions to this release.
Minimum supported versions
- JDK 11
- Gradle 8.5
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 24
- Gradle 8.14.3
- Gradle 9.0.0-rc2
- Android Gradle Plugin 8.11.1
- Android Gradle Plugin 8.12.0-alpha08
- Kotlin Gradle Plugin 2.2.0
- Kotlin Gradle Plugin 2.2.20-Beta1
0.33.0
Caution
Sonatype OSSRH (oss.sonatype.org and s01.oss.sonatype.org) will be shut down on June 30, 2025.
Migration steps:
- Sign in to the Central Portal with your existing Sonatype account
- Go to Namespaces and click "Migrate Namespace"
for the relevant namespace. Confirm the migration and wait for it to complete. - Optional: If you want to publish snapshots of your project tap the 3 dots next to your namespace and
select "Enable SNAPSHOTs" - Go to Account and select "Generate User Token". Use the shown
"Username" and "Password" as values formavenCentralUsernameandmavenCentralPassword. - Configure this plugin to publish to Central Portal. Either update your
SONATYPE_HOSTproperty from
DEFAULTorS01toCENTRAL_PORTALor callpublishToMavenCentral()/publishToMavenCentral(automaticRelease)
without aSonatypeHostparameter.
BREAKING
publishToMavenCentral()andpublishToMavenCentral(automaticRelease)withoutSonatypeHostwill
now publish through the Central Portal.- Deprecated overloads of
publishToMavenCentralthat take aSonatypeHostparameter. - Deprecated
SonatypeHost.
New
- Basic experimental support for
com.android.fused-library. There are currently several limitations
on the Android Gradle plugin side which make signing as well as publishing sources/javadocs not possible.
Improvements
- Added new Gradle properties
mavenCentralPublishing=truereplacesSONATYPE_HOST=CENTRAL_PORTALmavenCentralAutomaticPublishing=truereplacesSONATYPE_AUTOMATIC_RELEASE=truesignAllPublications=truereplacesRELEASE_SIGNING_ENABLED=true- Note: The old properties continue to work and there are no plans to remove them
- The base plugin is now compatible with isolated projects as long as
pomFromGradleProperties()is
not called. - It's possible to pass a
TaskProvidertoJavadocJar.Dokka - Improved naming of produced
-javadocjars (locally, the name of the published artifact is unchanged) - Resolve issue that caused
versionto be read too early when publishing to
Central Portal.
Thanks to @Goooler, @solrudev and @sschuberth for their contributions to this release.
Minimum supported versions
- JDK 11
- Gradle 8.5
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 24
- Gradle 8.14.2
- Gradle 9.0-rc1
- Android Gradle Plugin 8.10.0
- Android Gradle Plugin 8.11.0-rc02
- Android Gradle Plugin 8.12.0-alpha06
- Kotlin Gradle Plugin 2.1.21
- Kotlin Gradle Plugin 2.2.0-RC3
0.32.0
- Improve names of Central Portal deployments.
- Fix an issue where the wrong staging profile for (s01.)oss.sonatype.org was selected
when publishing to Maven Central. - Fix incompatibility with Kotlin 1.9.x when used through compiled plugins.
- Improve error message when not being able to detect Kotlin plugin.
- Fix an issue with detecting whether configuration cache is enabled which lead to a not
actionable error message. - Fix compatibility with Gradle 9.0.
Minimum supported versions
- JDK 11
- Gradle 8.5
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 24
- Gradle 8.14
- Gradle 9.0-milestone-6
- Android Gradle Plugin 8.10.0
- Android Gradle Plugin 8.11.0-alpha10
- Kotlin Gradle Plugin 2.1.20
- Kotlin Gradle Plugin 2.1.21-RC2
- Kotlin Gradle Plugin 2.2.0-Beta2
Configuration cache status
Configuration cache is generally supported, except for:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- When using Dokka 1.x or Dokka 2.x without
0.31.0
- Add support for publishing snapshots to Central Portal.
- Make sure to enable snapshots for your namespace on central.sonatype.com.
- Thanks to @solrudev for the contribution.
- Add support for multiple matching staging profiles by taking the one with the longest
matching prefix.
Minimum supported versions
- JDK 11
- Gradle 8.5
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 23
- Gradle 8.13
- Android Gradle Plugin 8.9.0
- Android Gradle Plugin 8.10.0-alpha07
- Kotlin Gradle Plugin 2.1.10
- Kotlin Gradle Plugin 2.1.20-RC
Configuration cache status
Configuration cache is generally supported, except for:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- When using Dokka 1.x or Dokka 2.x without
V2Enabled
0.30.0
- Add support for Dokka 2.0.0-Beta
- Supports
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled - Supports both
org.jetbrains.dokkaandorg.jetbrains.dokka-javadoc - If both are applied the javadoc output is published
- Removed support for the old
org.jetbrains.dokka-androidplugin
- Supports
- Support custom Sonatype hosts by providing a
httpsurl inSONATYPE_HOSTGradle property - Remove usages of deprecated Gradle API that is scheduled to be removed in Gradle 9.0
- Raised minimum supported Gradle version
- Improve naming of javadoc jars
Minimum supported versions
- JDK 11
- Gradle 8.5
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 23
- Gradle 8.10.2
- Android Gradle Plugin 8.7.0
- Android Gradle Plugin 8.8.0-alpha05
- Kotlin Gradle Plugin 2.0.20
- Kotlin Gradle Plugin 2.1.0-Beta1
Configuration cache status
Configuration cache is generally supported, except for:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- When using Dokka 1.x or Dokka 2.x without
V2Enabled
0.29.0
- Added
configureBasedOnAppliedPlugins(sourcesJar: Boolean, javadocJar: Boolean)
overload that allows disabling sources and javadoc jars without having to use
the more granularPlatformAPIs. - For Java library and Kotlin/JVM projects the Gradle module metadata now properly
includes the sources jar. - When running on Gradle 8.8 or newer the pom configuration is not applied in
afterEvaluateanymore, making manual overrides easier. - Fix potential issue with the javadoc jar tasks that can cause Gradle to disable
optimizations. - When staging profiles can't be loaded the status code of the response is added
to the error message.
Minimum supported versions
- JDK 11
- Gradle 8.1
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 21
- Gradle 8.8
- Android Gradle Plugin 8.5.0
- Android Gradle Plugin 8.6.0-alpha06
- Kotlin Gradle Plugin 2.0.0
- Kotlin Gradle Plugin 2.0.20-Beta1
Configuration cache status
Configuration cache is generally supported, except for:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- Dokka does not support configuration cache
0.28.0
- Added support for publishing through the new Central Portal. To use
this use theCENTRAL_PORTALoption when specifying the Sonatype host. - For Kotlin Multiplatform the main plugin will now automatically publish the
releasevariant if the project has an Android target and no variant was explicitly
specified through the Kotlin Gradle DSL. - Support specifying the Android variants to publish in
KotlinMultiplatform(...). - Updated minimum supported Gradle, Android Gradle Plugin and Kotlin versions.
- Removed support for the deprecated Kotlin/JS plugin.
- Removed the deprecated
closeAndReleaseRepositorytask. UsereleaseRepository, which
is functionally equivalent, instead.
Minimum supported versions
- JDK 11
- Gradle 8.1
- Android Gradle Plugin 8.0.0
- Kotlin Gradle Plugin 1.9.20
Compatibility tested up to
- JDK 21
- Gradle 8.6
- Gradle 8.7-rc-3
- Android Gradle Plugin 8.3.0
- Android Gradle Plugin 8.4.0-alpha13
- Kotlin Gradle Plugin 1.9.23
- Kotlin Gradle Plugin 2.0.0-Beta4
Configuration cache status
Configuration cache is generally supported, except for:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- Dokka does not support configuration cache
0.27.0
- Added new publishing related tasks
releaseRepositoryreleases a staging repository at the end of the build
and can be executed in the same build as the publishing task. This allows
having automatic releases without permanently enabling them.publishToMavenCentralas alias for runningpublishAllPublicationsToMavenCentralRepository.publishAndReleaseToMavenCentralas alias for running both of the above.- For more information checkout the docs.
- It is now possible to only pass a subset of the parameters to
coordinates(...)and leave the others at their default value.
Thanks to @sschuberth for the contribution. - Fixed
java-test-fixtureprojects being broken with Gradle 8.6. - Deprecated
closeAndReleaseRepositoryin favor ofreleaseRepository.
Minimum supported versions
- JDK 11
- Gradle 7.6
- Android Gradle Plugin 7.4.0
- Kotlin Gradle Plugin 1.8.20
Compatibility tested up to
- JDK 21
- Gradle 8.5
- Gradle 8.6-rc-1
- Android Gradle Plugin 8.2.1
- Android Gradle Plugin 8.3.0-beta01
- Android Gradle Plugin 8.4.0-alpha03
- Kotlin Gradle Plugin 1.9.22
- Kotlin Gradle Plugin 2.0.0-Beta2
Configuration cache status
When using Gradle 8.1 or newer configuration cache is generally supported.
Exceptions to that are:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- Dokka does not support configuration cache
0.26.0
- It's now supported to call
configure(Platform)from the main plugin to modify
what is getting published. Check out the docs for more details - The base plugin now has a
configureBasedOnAppliedPluginsDSL method to
allow applying the defaultconfigurelogic of the main plugin. - Calling
configure(Platform)now validates that the required plugins are
applied (e.g. Android Gradle Plugin for Android projects). - It's now possible to disable source publishing for KMP projects.
- Fixed an issue which would cause the javadoc jar task to be registered multiple
times for Gradle plugin projects with more than one publication. Thanks to
@autonomousapps for the fix. - Publishing Kotlin/JS projects has been deprecated and will be removed in the
next release, because the Kotlin/JS plugin has been deprecated. - The internal task to create a javadoc jar for certain project types has been renamed
fromsimpleJavadocJartoplainJavadocJar. Thanks to @sschuberth.
Minimum supported versions
- JDK 11
- Gradle 7.6
- Android Gradle Plugin 7.4.0
- Kotlin Gradle Plugin 1.8.20
Compatibility tested up to
- JDK 21
- Gradle 8.5
- Android Gradle Plugin 8.2.0
- Android Gradle Plugin 8.3.0-alpha17
- Kotlin Gradle Plugin 1.9.21
- Kotlin Gradle Plugin 2.0.0-Beta1
Configuration cache status
When using Gradle 8.1 or newer configuration cache is generally supported.
Exceptions to that are:
- Publishing releases to Maven Central (snapshots are fine), blocked by Gradle issue #22779.
- Dokka does not support configuration cache
0.25.3
- Gradle 8.2: Fix error for projects that use the
java-test-fixturesplugin. - Fix issue for Kotlin Multiplatform projects when running tests and having signing enabled.