Set up a Kotlin Multiplatform SQLDelight database
Learn how to set up a Kotlin Multiplatform SQLDelight database with CRUD operations, migrations, and platform-specific drivers.
Posted by
Related reading
Kotlin Multiplatform image loading with Coil 3 in 2026
Learn how to load and cache images in Kotlin Multiplatform using Coil 3 with this comprehensive guide for Compose Multiplatform.
Kotlin Multiplatform in-app purchases with RevenueCat
Learn how to implement in-app purchases and subscriptions in your Kotlin Multiplatform app using RevenueCat with our step-by-step guide.
Kotlin Multiplatform push notifications: a complete guide 2026
Learn how to implement Kotlin Multiplatform push notifications for Android and iOS using Firebase Cloud Messaging and APNs.
- This article explains how to set up a local database using SQLDelight in Kotlin Multiplatform.
- You will learn about shared schema definitions, CRUD operations, and platform-specific drivers.
- Follow the step-by-step guide to implement a fully functional cross-platform database.
How does SQLDelight work in Kotlin Multiplatform?
Why use SQLDelight for a KMP local database?
How to set up SQLDelight in your Kotlin Multiplatform project?
-
Create a new Kotlin Multiplatform project
Use the Kotlin Multiplatform project template in your IDE or create a project structure manually by defining theshared,android, andiosmodules. -
Add SQLDelight dependencies
In yourbuild.gradle.ktsfile, add the following SQLDelight dependencies:kotlinplugins { kotlin(
Build your KMP app faster
Skip the setup and start shipping with a production-ready Kotlin Multiplatform starter kit.