Skip to content

feat(kotlin): publish Kotlin SDK to Maven Central#284

Merged
soamdesai-tfh merged 7 commits into
mainfrom
feat/kotlin-maven-central
Jun 18, 2026
Merged

feat(kotlin): publish Kotlin SDK to Maven Central#284
soamdesai-tfh merged 7 commits into
mainfrom
feat/kotlin-maven-central

Conversation

@soamdesai-tfh

@soamdesai-tfh soamdesai-tfh commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Moved into the main repo from #281 (originally opened from a fork). The review discussion — including @Guardiola31337's feedback, which has been addressed — lives on #281.

What

Wires Maven Central publishing into the Kotlin release pipeline, building on the Central-ready publication from #269. On production releases the workflow now publishes com.worldcoin:idkit to Maven Central (signed), in addition to the existing GitHub Packages publish — so consumers can use implementation("com.worldcoin:idkit:<version>") with mavenCentral() and no authentication.

Changes

  • publish-kotlin.yml: a production-gated "Publish to Maven Central" step that passes -Pidkit.publish.mavenCentral=true to activate the Central repository + signing, running before the GitHub Packages step. Dev releases omit the flag and publish to GitHub Packages alone.
  • Central validation gate: a "Wait for Maven Central validation" step polls the Portal until the deployment is VALIDATED (timing out at ~30 min) before the GitHub Packages publish, so a validation failure aborts the release before anything lands on GitHub Packages.
  • README.md: leads with Maven Central as the no-auth install path; documents the dual publish behavior.
  • scripts/publish-relocation-pom.sh: one-time relocation POM pointing old com.worldcoin:idkit-kotlin consumers at com.worldcoin:idkit.

Verification

  • Dry-run confirms the flag-gating: with the flag the task graph includes signMavenPublication + publishToMavenCentral; without it, publish targets GitHub Packages only (no Central repo, no signing) — dev releases stay Central-free.
  • Publishing credentials were dress-rehearsed against the Central Portal end-to-end and reached VALIDATED.

The first release is USER_MANAGED (confirmed manually in the Central Portal UI); a follow-up switches it to fully automatic via publishAndReleaseToMavenCentral.


Note

Medium Risk
Changes the production release pipeline and uses signing/Central credentials, but dev releases are unchanged and GitHub Packages is gated on Central validation success.

Overview
Production Kotlin releases now upload a signed com.worldcoin:idkit artifact to Maven Central (via -Pidkit.publish.mavenCentral=true and :bindings:publishToMavenCentral) before the existing GitHub Packages step; dev releases still publish to GitHub Packages only.

A new Wait for Maven Central validation step polls the Central Portal until the deployment is validated (or fails after ~30 minutes), so a bad Central upload blocks GitHub Packages from publishing.

kotlin/README.md is updated to describe Maven Central as the no-auth install path and the dual publish behavior (Central + GitHub for releases; GitHub-only for dev).

scripts/publish-relocation-pom.sh is added as a one-time helper to publish a relocation POM from legacy com.worldcoin:idkit-kotlin to com.worldcoin:idkit after the first Central release is live.

Reviewed by Cursor Bugbot for commit ac9583b. Bugbot is set up for automated code reviews on this repo. Configure here.

soamdesai-tfh and others added 7 commits June 15, 2026 10:55
Build on the Central-ready Kotlin publication now on main by wiring Maven
Central into the release pipeline. The new step passes
-Pidkit.publish.mavenCentral=true to activate the Central repository and
signing, and runs before the GitHub Packages step. Dev releases omit the
flag and publish to GitHub Packages alone.

- publish-kotlin.yml: add a production-gated "Publish to Maven Central" step
- README: lead with Maven Central as the no-auth install path; note the
  release workflow now publishes to both Central and GitHub Packages
- scripts/publish-relocation-pom.sh: one-time relocation POM pointing the
  old com.worldcoin:idkit-kotlin coordinates at com.worldcoin:idkit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The closing paragraph still said the release workflow does not publish to
Maven Central, contradicting the section intro now that this PR wires it in.
Rewrite it to describe the automated production Central publish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The comment claimed Central-first ordering aborts on validation failure
before GitHub Packages publishes. In vanniktech 0.34.0 publishToMavenCentral
only uploads the deployment and returns; Portal validation is asynchronous
and is not awaited in CI, so it cannot fail the job. Clarify that only
build/signing/upload failures abort, and that USER_MANAGED manual confirm
in the Portal is the real gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Installation: note Maven Central availability follows the first release,
  rather than implying the artifact is already there
- Publishing: name the upload-only :bindings:publishToMavenCentral task the
  workflow runs, so it isn't read as the publishAndReleaseToMavenCentral
  command shown just above

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
publishToMavenCentral only uploads the deployment and returns; Central
Portal validation is asynchronous, so GitHub Packages could previously
publish even if validation later failed. Add a step that polls the Portal
until the deployment is validated before publishing to GitHub Packages, so
a validation failure stops the job first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Make the "Wait for Maven Central validation" step resilient to transient
curl transport errors. `|| echo 000` keeps a momentary DNS/connection/
timeout failure from tripping the runner's `set -e` and aborting an
otherwise-good release; 000 != 200 so the loop simply retries.

Docs: drop a stray publishToMavenLocal from the local verification block,
dedupe the local-publish guidance to one canonical spot (Installation), and
reword the Publishing opener so it no longer implies the first (USER_MANAGED)
release goes live on Maven Central automatically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Validation has no fixed SLA and the first deployment is the slow case;
the Vanniktech/Maven tooling defaults to 30-60 min for this reason. The
prior ~10 min budget risked falsely aborting (and skipping GitHub Packages
for) a release that would have validated. Bump the poll to 120 x 15s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Jun 16, 2026 4:01pm

Request Review

@Guardiola31337 Guardiola31337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. i checked the release workflow wiring, central upload/validation gate, relocation pom helper, and docs. ci is green, and local dry-runs confirm the central path is only enabled with -Pidkit.publish.mavenCentral=true while the default bindings:publish path remains github packages-only.

@soamdesai-tfh soamdesai-tfh merged commit 440bbf8 into main Jun 18, 2026
50 of 51 checks passed
@soamdesai-tfh soamdesai-tfh deleted the feat/kotlin-maven-central branch June 18, 2026 03:52
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.

2 participants