Configuration
All JNI settings are nested under platform.jvm.jni inside the kreate { } block.
Minimal Setup
With only enabled = true, Kreate resolves all other values from the project configuration automatically.
Full Configuration
DSL Reference
Property | Type | Default | Description |
|---|---|---|---|
|
|
| Enables the JNI feature and registers all related tasks |
|
| (project name) | Overrides the native project name used for CMake target and directory resolution |
|
|
| Root directory that contains the native project folder |
enabled
Controls whether the entire JNI feature is active. When false (the default), no tasks are registered and no build pipeline changes are applied.
nameOverride
By default, Kreate derives the native project name from project.name in kreate { project { name = ... } }, falling back to the Gradle project name. The resolved name is sanitized before use. Use nameOverride when you need a specific CMake target name that differs from the Kotlin project name.
projectDirectory
Overrides the root directory where Kreate looks for (and creates) the native project folder. The actual native project lives at <projectDirectory>/<projectName>/.