Kreate v1.2.3 Help

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

Add the plugin entry to gradle/libs.versions.toml:

[plugins] kreate = { id = "com.davils.kreate", version = "1.1.0" }

Then apply it in your module's build.gradle.kts:

plugins { alias(libs.plugins.kreate) kotlin("jvm") version "2.3.21" }

Direct Application

plugins { id("com.davils.kreate") version "1.1.0" }

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.

import java.time.Year group = "com.example" kreate { platform { javaVersion = JavaVersion.VERSION_17 explicitApi = true allWarningsAsErrors = true } project { name = "MyAwesomeProject" description = "A multi-module project using Kreate" projectGroup = group.toString() version { environment = "CI_COMMIT_TAG" property = "version" } } }

Project Structure

A typical project layout when using Kreate looks like this:

. ├── build.gradle.kts # Root build file ├── settings.gradle.kts # Gradle settings ├── gradle/ │ └── libs.versions.toml # Version catalog ├── my-module/ │ ├── build.gradle.kts # Module configuration with kreate { } │ ├── src/ # Kotlin source code │ ├── jni/ # C/C++ sources (JNI, optional) │ └── cinterop/ # Rust sources (C-Interop, optional) └── gradle.properties

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

platform

explicitApi

false

Enforces Kotlin Explicit API mode

platform

allWarningsAsErrors

true

Treats all compiler warnings as errors

platform.jvm.jni

enabled

false

Enables JNI/CMake native integration

platform.multiplatform.cInterop

enabled

false

Enables Rust C-Interop bridge

project.buildConstant

enabled

false

Generates type-safe Kotlin build constants

project.docs

enabled

false

Configures Dokka documentation generation

project.tests

enabled

true

Configures Kotest integration and reporting

project.publish

enabled

false

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 cinterop and cargo.

  • 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.

06 May 2026