feat(build): publish to Maven Central (vanniktech, Central Portal)#38
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes every library module publishable as
kr.devslab:devslab-kit-*on Maven Central — the first-release groundwork.Changes
sample-app, inside the existingsubprojectsblock. 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 owndescription.gradle.properties(new):SONATYPE_HOST=CENTRAL_PORTAL,SONATYPE_AUTOMATIC_RELEASE,RELEASE_SIGNING_ENABLED, and sharedPOM_*metadata (url, license, developer, scm)..github/workflows/release.yml(new): av*tag publishes every library module (signed) and opens a GitHub Release. Uses org-levelMAVEN_CENTRAL_*+SIGNING_*secrets; GraalVM 21 to match the build workflow.0.0.1-SNAPSHOT→0.1.0-SNAPSHOT(first public release is 0.1.0).CHANGELOG.ko.md.Verification
./gradlew publishToMavenLocal --no-daemongreen — all 16 library modules producejar + sources + javadoc + .module + .pom, each POM carryingname,description,url,licenses,scm,developers(the fields Central validates).sample-appexcluded../gradlew build --no-daemongreen (17 test tasks).Notes
-SNAPSHOT, so local publish needs no GPG key. The actual release (flip to0.1.0, tag, push) comes after the docs surfaces are ready, per the devslab-kr release checklist.