Skip to content

chore(build): Maven Central publishing via vanniktech (Central Portal)#9

Merged
Kitty-Hivens merged 1 commit into
mainfrom
chore/maven-central-publish
May 29, 2026
Merged

chore(build): Maven Central publishing via vanniktech (Central Portal)#9
Kitty-Hivens merged 1 commit into
mainfrom
chore/maven-central-publish

Conversation

@Kitty-Hivens

@Kitty-Hivens Kitty-Hivens commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

Wire libtray for publishing to Maven Central (new Central Portal,
central.sonatype.com) so consumers can pin a legible semver
(dev.hivens:libtray:0.1.0) instead of a raw commit sha.

  • Replace the bare maven-publish + hand-rolled publishing {} block with
    the vanniktech com.vanniktech.maven.publish plugin. It applies
    maven-publish + signing, builds the sources + javadoc jars, signs every
    artifact, assembles the deployment bundle, and uploads it to the Central
    Portal Publisher API. The existing POM metadata carries over unchanged.
  • Host pinned explicitly to SonatypeHost.CENTRAL_PORTAL (the namespace is
    verified on the new portal; the plugin's no-arg default has varied by
    version and could hit legacy OSSRH).
  • Drop the manual withSourcesJar() / withJavadocJar() -- the plugin
    manages those (declaring them twice double-registers the artifacts).

Plugin version pinned in the catalog as a starting point; bump to the
latest before relying on it. Secrets (Central Portal token + GPG signing
key) are read from ~/.gradle/gradle.properties or env and are never
committed. Version comes from the git tag, so release flow is: tag
0.1.0 -> ./gradlew publishToMavenCentral.

Test plan

  • ./gradlew help configures cleanly with the plugin applied
  • publishToMavenCentral / publishAndReleaseToMavenCentral tasks registered
  • First real publish of dev.hivens:libtray:0.1.0 to the Central Portal

…Portal)

Replace the bare maven-publish + hand-rolled publishing block with the
vanniktech maven-publish plugin, which targets the new Central Portal: it
signs all artifacts, builds the sources + javadoc jars, and uploads the
deployment bundle. POM metadata carried over unchanged.

Scaffold only: the plugin version is a starting point (verify latest), and
the Central Portal token + GPG signing key are read from
~/.gradle/gradle.properties or env, never committed. Coordinates
dev.hivens:libtray, version from the git tag.
@Kitty-Hivens Kitty-Hivens merged commit bb034a5 into main May 29, 2026
1 check passed
@Kitty-Hivens Kitty-Hivens deleted the chore/maven-central-publish branch May 29, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant