Maven Central
Kreate uses the Gradle Maven Publish Plugin by Vanniktech to publish to Maven Central. When enabled, Kreate configures coordinates, signing, and POM metadata from your kreate { } block — no manual mavenPublishing { } block is required.
Prerequisites
Before publishing to Maven Central, you need:
A Central Portal account at central.sonatype.com
A registered namespace (your
group, e.g.com.example) verified in the portalA GPG key pair for signing artifacts
Create a GPG key pair and distribute the public key to a keyserver:
Enabling Maven Central
Calling repositories { mavenCentral { } } automatically sets enabled = true for the Maven Central target:
Maven Central Properties
Property | Type | Default | Description |
|---|---|---|---|
|
|
| Activates the Maven Central publish target (set automatically when using the |
|
|
| When |
|
|
| Calls |
automaticRelease
When true, Kreate passes automaticRelease = true to publishToMavenCentral(). The Vanniktech plugin then:
Uploads the artifacts to a new deployment
Polls the deployment status every 5 seconds until it reaches
VALIDATEDorFAILEDAutomatically releases the deployment to Maven Central
The validation timeout is 60 minutes by default. After a successful release, artifacts become available in Maven Central within 10–30 minutes.
When false, the plugin only uploads the deployment. Go to Deployments on the Central Portal and click Publish manually afterward.
signPublications
Signing is a hard requirement for Maven Central releases. Kreate calls signAllPublications() when this is true. Set it to false only for snapshot publishing where signing is not required.
Gradle Tasks
Task | Description |
|---|---|
| Uploads artifacts; releases automatically if |
| Always uploads and releases, ignoring the |
Credentials and Signing
Local (~/.gradle/gradle.properties)
CI — In-Memory GPG Signing
For CI environments, use in-memory signing to avoid placing private key files on the build agent. The Vanniktech plugin reads the private key directly from a Gradle property.
Step 1 — Export only the Base64 key content:
This strips the -----BEGIN PGP PRIVATE KEY BLOCK-----/-----END PGP PRIVATE KEY BLOCK----- headers, the =checksum trailer line, and all blank lines, leaving only the raw Base64 content.
Step 2 — Store as a masked CI/CD variable:
Store the single-line Base64 output as GPG_PRIVATE_KEY in your pipeline settings under Settings → CI/CD → Variables. Enable Masked to prevent it from appearing in logs.
Step 3 — Set Gradle properties in the pipeline:
signingInMemoryKeyId is optional — only needed when the keyring contains multiple keys and you want to target a specific one.
Coordinates
Kreate derives the Maven coordinates automatically from your kreate { project { } } block:
Coordinate | Source | Fallback |
|---|---|---|
|
| Gradle |
|
| Gradle |
|
| — |
Snapshot Publishing
Set the project version to end in -SNAPSHOT and run:
Snapshots are available immediately in the Central Portal snapshot repository after the task completes. Signing is not required for snapshots — but if credentials are present, the artifacts will still be signed.