Skip to content

feat(build): publish to Maven Central (vanniktech, Central Portal)#38

Merged
jlc488 merged 2 commits into
mainfrom
feat/maven-central-publishing
May 31, 2026
Merged

feat(build): publish to Maven Central (vanniktech, Central Portal)#38
jlc488 merged 2 commits into
mainfrom
feat/maven-central-publishing

Conversation

@jlc488

@jlc488 jlc488 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Makes every library module publishable as kr.devslab:devslab-kit-* on Maven Central — the first-release groundwork.

Changes

  • Root build: vanniktech maven-publish (0.30.0) on the buildscript classpath, applied to every module except the runnable sample-app, inside the existing subprojects block. All current Spring Boot / GraalVM-toolchain / dependency-management config is preserved. coordinates() = group + module name + version; POM <name> = module name, <description> read lazily from each module's own description.
  • gradle.properties (new): SONATYPE_HOST=CENTRAL_PORTAL, SONATYPE_AUTOMATIC_RELEASE, RELEASE_SIGNING_ENABLED, and shared POM_* metadata (url, license, developer, scm).
  • .github/workflows/release.yml (new): a v* tag publishes every library module (signed) and opens a GitHub Release. Uses org-level MAVEN_CENTRAL_* + SIGNING_* secrets; GraalVM 21 to match the build workflow.
  • Version 0.0.1-SNAPSHOT0.1.0-SNAPSHOT (first public release is 0.1.0).
  • CHANGELOG: documented Maven Central publishing, the pluggable cache (ADR 0002), and the JWT injected-clock fix; added the Korean mirror CHANGELOG.ko.md.

Verification

  • ./gradlew publishToMavenLocal --no-daemon green — all 16 library modules produce jar + sources + javadoc + .module + .pom, each POM carrying name, description, url, licenses, scm, developers (the fields Central validates). sample-app excluded.
  • ./gradlew build --no-daemon green (17 test tasks).

Notes

  • Signing is a no-op for -SNAPSHOT, so local publish needs no GPG key. The actual release (flip to 0.1.0, tag, push) comes after the docs surfaces are ready, per the devslab-kr release checklist.
  • If the org secrets are scoped to selected repositories, this repo must be granted access before the first release.

jlc488 added 2 commits May 31, 2026 17:47
Makes every library module publishable as kr.devslab:devslab-kit-* on Maven
Central, so consumers can depend on the starter without building from source.

- Root build: put com.vanniktech.maven.publish (0.30.0) on the buildscript
  classpath and apply it to every module except the runnable sample-app, in the
  existing subprojects block (all the current Spring Boot / GraalVM toolchain /
  dependency-management config is preserved). coordinates() = group + module name
  + version; the POM <name> is the module name and <description> is read lazily
  from each module's own `description` (set in its build.gradle.kts).
- gradle.properties (new): SONATYPE_HOST=CENTRAL_PORTAL, SONATYPE_AUTOMATIC_RELEASE,
  RELEASE_SIGNING_ENABLED, and the shared POM_* metadata (url, license, developer,
  scm).
- .github/workflows/release.yml (new): a `v*` tag publishes every library module
  (signed) and opens a GitHub Release. Uses the org-level MAVEN_CENTRAL_* and
  SIGNING_* secrets; GraalVM 21 toolchain to match the build workflow.
- Version 0.0.1-SNAPSHOT -> 0.1.0-SNAPSHOT (the first public release is 0.1.0).
- CHANGELOG: documented Maven Central publishing, the pluggable cache (ADR 0002),
  and the JWT injected-clock fix; added the Korean mirror (CHANGELOG.ko.md).

Verified: ./gradlew publishToMavenLocal --no-daemon green — all 16 library
modules produce jar + sources + javadoc + .module + a POM carrying name,
description, url, licenses, scm and developers (the fields Central validates);
sample-app excluded. ./gradlew build --no-daemon green (17 test tasks).

Signing is a no-op for -SNAPSHOT, so local publish needs no GPG key. The real
release (flip 0.1.0-SNAPSHOT -> 0.1.0, tag, push) comes after the docs surfaces
are ready, per the devslab-kr release checklist. If the org secrets are scoped to
selected repositories, this repo must be granted access before the first release.
The first publishing commit failed CI (and locally): vanniktech's
signAllPublications() threw "The value for this property is final and cannot be
changed any further" under Gradle 9.x. Root cause was a double-configuration of
signing — RELEASE_SIGNING_ENABLED=true in gradle.properties AND
signAllPublications() in the build script both configure the signing property, so
the second call hit an already-finalized property (Gradle 9 finalizes earlier
than 8.x). Bumping the plugin version alone did not help (0.34.0 failed the same
way), confirming it was the conflict, not the version.

- Remove RELEASE_SIGNING_ENABLED from gradle.properties; keep the explicit
  signAllPublications() (signs releases with the org key, no-op for -SNAPSHOT).
- Bump vanniktech 0.30.0 -> 0.36.0 (latest; best Gradle 9.5 support) while here.
- Comment the gotcha in build.gradle.kts so the two aren't combined again.

Verified: ./gradlew publishToMavenLocal --no-daemon green — all 16 library
modules produce jar + sources + javadoc + .module + .pom (Central-required set).
@jlc488
jlc488 merged commit a691cc2 into main May 31, 2026
1 check passed
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