Publishing
The publish { } block inside kreate { project { } } integrates artifact publishing into your Gradle build. Kreate supports two publish targets out of the box:
Maven Central via the Gradle Maven Publish Plugin by Vanniktech
GitLab Package Registry via the standard Gradle
maven-publishplugin with CI job token authentication
Publishing is disabled by default. To use it, you must manually apply the required plugins and then enable it in Kreate.
Required Plugins
For GitLab publishing, apply the standard maven-publish plugin:
For Maven Central publishing, apply the Vanniktech Maven Publish Plugin:
Kreate Configuration
Enable the publishing module:
How It Works
When enabled is true, Kreate evaluates each repository target independently. A repository is only configured when its own enabled property is also true. The two targets are completely independent and can be active simultaneously.
Top-Level Properties
Property | Type | Default | Description |
|---|---|---|---|
|
|
| Master switch — must be |
|
|
| Written into the POM |
|
| (not set) | Written into the POM |
All POM metadata is shared between both Maven Central and GitLab publish targets. Configure it once in pom { } and Kreate applies it to both.
Next Steps
Maven Central Publishing: GPG signing and automatic releases
GitLab Package Registry: CI integration and job token auth
POM Configuration: Licenses, SCM, and developer metadata
Examples: Practical publishing setups and snippets