Adding SQLDelight to the project
See original GitHub issueI would like to ask a question, if you can help me with it: I’m trying to add SQLDelight to the project. In its doc page it is said to add these dependencies:
kotlin {
// The drivers needed will change depending on what platforms you target:
sourceSets.androidMain.dependencies {
implementation "com.squareup.sqldelight:android-driver:1.4.3"
}
// or sourceSets.iosMain, sourceSets.windowsMain, etc.
sourceSets.nativeMain.dependencies {
implementation "com.squareup.sqldelight:native-driver:1.4.3"
}
sourceSets.jvmMain.dependencies {
implementation "com.squareup.sqldelight:sqlite-driver:1.4.3"
}
}
So, in which part of the template should this be added? I have failed to find specific sourceSet for native, to tell the truth.
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Using SQLDelight in Kotlin Multiplatform Project
A comprehensive example of integrating SQLDelight library in a Kotlin Multiplatform project.
Read more >Getting Started - SQLDelight - Cash App Code Blog
First apply the gradle plugin in your project. ... Put your SQL statements in a .sq file under src/commonMain/sqldelight . Typically the first...
Read more >Intro to SQLDelight - LogRocket Blog
The only change will be the dependency of the database driver that's added. To begin, open IntelliJ and create a new project inside...
Read more >SQLDelight: Getting Started - Tony Owen - Medium
Here's what needs to be added to your gradle build files. Project build.grade file: dependencies { // any other shizzle classpath 'com.squareup.sqldelight: ...
Read more >Adding some Storage (to) Space - John O'Reilly
So, in previous post (Minimal Kotlin Multiplatform project using ... So, changes to add SQLDelight to project were made in following commit.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
iosArm64Main is symbolic link to iosX64Main. It is workaround because sqldelight not provide iosMain metadata artifact. You will change only sources in iosX64Main - arm will use same code by symlink
@Jaime97 @rhonyabdullah here you can see how configure sqldelight with moko-template https://github.com/icerockdev/moko-template/commit/ccc530b9bbded174b2bdb992375ad5062862819b i use this docs for setup - https://kotlinlang.org/docs/mobile/configure-sqldelight-for-data-storage.html