Installation
Android (single-module)
1. Configure repositories
settings.gradle.kts
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
2. Apply the plugin and add dependencies
app/build.gradle.kts
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android") version "2.3.20"
id("io.github.sufarook.kiln") version "1.0.0-alpha04"
}
dependencies {
implementation("io.github.sufarook.kiln:annotations:1.0.0-alpha04")
implementation("io.github.sufarook.kiln:runtime:1.0.0-alpha04")
implementation("app.cash.sqldelight:android-driver:2.3.2")
}
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.
shared/build.gradle.kts
plugins {
kotlin("multiplatform")
id("com.android.library")
id("io.github.sufarook.kiln") version "1.0.0-alpha04"
}
kotlin {
androidTarget()
iosArm64()
iosX64()
iosSimulatorArm64()
sourceSets {
commonMain.dependencies {
implementation("io.github.sufarook.kiln:annotations:1.0.0-alpha04")
implementation("io.github.sufarook.kiln:runtime:1.0.0-alpha04")
}
androidMain.dependencies {
implementation("app.cash.sqldelight:android-driver:2.3.2")
}
iosMain.dependencies {
implementation("app.cash.sqldelight:native-driver:2.3.2")
}
}
}
iOS driver factory
On iOS use IosDatabaseDriverFactory instead of the Android one:
iosMain
val driver = IosDatabaseDriverFactory().create("myapp.db")
val noteRepo = NoteRepository(driver).also { it.createTable() }
Maven coordinates
| Artifact | Coordinate |
|---|---|
| Annotations | io.github.sufarook.kiln:annotations:1.0.0-alpha04 |
| Runtime | io.github.sufarook.kiln:runtime:1.0.0-alpha04 |
| Gradle plugin | io.github.sufarook.kiln (plugin id) |
Alpha release
Version 1.0.0-alpha04 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.