Installation
Android (single-module)
1. Configure repositories
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
2. Apply the plugin and add dependencies
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android") version "2.3.20"
id("io.github.sufarook.kiln") version "1.0.0-alpha08"
}
dependencies {
implementation("io.github.sufarook.kiln:annotations:1.0.0-alpha08")
implementation("io.github.sufarook.kiln:runtime:1.0.0-alpha08")
}
Plugin handles KSP
You do not need to apply com.google.devtools.ksp manually. The Kiln plugin detects your project type and applies KSP with the correct configuration.
Kotlin Multiplatform
For KMP projects the plugin configures kspCommonMainMetadata automatically — entities defined in commonMain are processed and their repositories are available on all targets.
plugins {
kotlin("multiplatform")
id("com.android.library")
id("io.github.sufarook.kiln") version "1.0.0-alpha08"
}
kotlin {
androidTarget()
iosArm64()
iosX64()
iosSimulatorArm64()
sourceSets {
commonMain.dependencies {
implementation("io.github.sufarook.kiln:annotations:1.0.0-alpha08")
implementation("io.github.sufarook.kiln:runtime:1.0.0-alpha08")
}
}
}
iOS driver factory
On iOS use IosDatabaseDriverFactory instead of the Android one:
val driver = IosDatabaseDriverFactory().create("myapp.db")
val noteRepo = NoteRepository(driver).also { it.createTable() }
Desktop / JVM
For pure JVM or Compose Desktop projects, use JvmDatabaseDriverFactory:
plugins {
kotlin("jvm")
id("io.github.sufarook.kiln") version "1.0.0-alpha08"
}
dependencies {
implementation("io.github.sufarook.kiln:annotations:1.0.0-alpha08")
implementation("io.github.sufarook.kiln:runtime:1.0.0-alpha08")
}
val driver = JvmDatabaseDriverFactory().create("myapp.db")
val repo = ProductRepository(driver).also { it.createTable() }
For tests or ephemeral use, create an in-memory database:
Tip
The generated code has no Android dependency — the runtime module is pure Kotlin.
Maven coordinates
| Artifact | Coordinate |
|---|---|
| Annotations | io.github.sufarook.kiln:annotations:1.0.0-alpha08 |
| Runtime | io.github.sufarook.kiln:runtime:1.0.0-alpha08 |
| Gradle plugin | io.github.sufarook.kiln (plugin id) |
Alpha release
Version 1.0.0-alpha08 is stable for Android production use. The public API is stable but minor breaking changes may occur before the 1.0.0 stable release. Watch the GitHub releases page for updates.