Quick question, on the SQL delight docs for KMP it...
# squarelibraries
h
Quick question, on the SQL delight docs for KMP it says the sql files should be at
src/main/sqldelight
but I've never seen any KMP project with a
src/main
folder. All the projects I work with use a
src/commonMain
module. Do I still need to have the sqls on a main src folder or is it possible to have them on commonMain?
h
main on JVM/Android projects, commonMain in KMP projects
h
Thank you sir!
s
good catch, we should probably update this. @Hrodrick wanna send a PR?
h
Sure! Here it is https://github.com/sqldelight/sqldelight/pull/6023 I saw a similar PR that adds some files to the multiplatform_sqlite folder. Not sure what is the difference between common and multiplatform_sqlite but the current docs uses common and I don't see why there should be a difference 🤔
s
The other PR was mine 😅 The
common
files are used by both Android and Multiplatform docs. With the changes in common merged, the Android docs too now state
commonMain/src
instead of
main/src
https://sqldelight.github.io/sqldelight/2.3.0-SNAPSHOT/android_sqlite/#defining-the-schema
h
Interesting, I think the real issue is that the android docs are using the
common
folder instead of the specific android_sqlite folder. It makes more sense to let android use the file at android_sqlite instead, with caution because the android_sqlite docs might be outdated