Getting Started
This guide walks you through adding Kreate to an existing Gradle project and configuring it for your use case.
Prerequisites
Before applying the plugin, make sure the following are available in your environment:
Gradle: 9.4.1 or later
Kotlin: 2.3.21 or later
Java: JDK 17 or later
Apply the Plugin
Using Version Catalogs (Recommended)
Add the plugin entry to gradle/libs.versions.toml:
Then apply it in your module's build.gradle.kts:
Direct Application
Basic Configuration
All configuration lives inside a single kreate { } block in your build.gradle.kts. Only configure what you need — everything else falls back to sensible defaults.
Project Structure
A typical project layout when using Kreate looks like this:
Feature Flags
Every major feature in Kreate is explicitly opt-in via an enabled flag. The table below shows the available top-level feature blocks and their defaults:
Block | Property | Default | Description |
|---|---|---|---|
|
|
| Enforces Kotlin Explicit API mode |
|
|
| Treats all compiler warnings as errors |
|
|
| Enables JNI/CMake native integration |
|
|
| Enables Rust C-Interop bridge |
|
|
| Generates type-safe Kotlin build constants |
|
|
| Configures Dokka documentation generation |
|
|
| Configures Kotest integration and reporting |
|
|
| Enables Maven Central / GitLab publishing |
Next Steps
Once the plugin is applied and the basic configuration is in place, explore the following topics:
Platform Configuration: Configure Java versions,
explicitApi, and Kotlin Multiplatform targets (Linux, macOS, Windows).C-Interop Overview: Integrate Rust libraries into KMP projects via
cinteropandcargo.JNI Support: Bridge C/C++ code into JVM projects using CMake-based native builds.
Build Constants: Generate type-safe Kotlin constants from Gradle properties at compile time.
Testing Overview: Configure Kotest parallel execution, test logging, reporting, and Dokka.
Publishing Overview: Set up automated GPG-signed publishing to Maven Central or GitLab Package Registry.