Hey so how to setup sqlDelight properly? I quadrup...
# squarelibraries
c
Hey so how to setup sqlDelight properly? I quadruple checked this repo and my file structure: https://github.com/kotlin-hands-on/kmm-networking-and-data-storage/tree/final This dudes post which is similar to my problem: https://kotlinlang.slack.com/archives/C3PQML5NU/p1602659275380200 And his “solution” here on this question : https://github.com/cashapp/sqldelight/issues/2050 Nothing really works, is there any gimmick that your eyes could sleep by?
r
This is what works for me: * The buildscript dependency goes in the root
build.gradle.kts
* The plugins.id block goes into your shared library
build.gradle.kts
. * In the
sqldelight { ... }
block, you could also try adding
sourceFolders = listOf("sqldelight")
(might be the default, but I've got it in my build) * In your shared lib kotlin.sourceSets you need to add the various sqldelight deps. In
commonMain
add the
runtime
artifact, in
androidMain
add
android-driver
, and
iosMain
add
native-driver
.
c
😓 I’m not doing anything different than this. I recently upgraded to 1.5.0-SNAPSHOT. I’m following this guy now, I haven’t done this step to of adding only the SQ file and co figuring dependencies, then build. I did it, it does not generate the correct files. I double checked my folder structure and tried a bunch of different paths to be sure. It doesn’t get created
This is a little bit frustrating. I removed the library for now and I’m going to create a new project from scratch and try to reproduce it