Thread
#multiplatform
    d

    Daniele B

    1 year ago
    Question about SqlDelight: I would like to place the database schema somewhere inside the “commonMain/kotlin” folder, rather than the “commonMain/sqldelight” folder. But I can’t find the way. Has anyone managed to do it?
    Big Chungus

    Big Chungus

    1 year ago
    Have you tried placing them in commonMain/resources?
    c

    Casey Brooks

    1 year ago
    The Gradle plugin documentation shows a
    sourceFolders
    property, is that not working? https://cashapp.github.io/sqldelight/multiplatform_sqlite/gradle/
    d

    Daniele B

    1 year ago
    @Casey Brooks
    sourceFolders
    defaults to the “sqldelight” folder. I can’t find a way to point it to the “commonMain/kotlin” folder
    c

    Casey Brooks

    1 year ago
    Defaults to [“sqldelight”] (src/main/sqldelight)
    Probably just unclear documentation, it should say “src/commonMain/sqldelight” in the MPP docs. It seems like you should be able to set
    sourceFolders = ["kotlin"]
    to reference
    .sq
    files in
    src/commonMain/kotlin
    d

    Daniele B

    1 year ago
    @Casey Brooks it worked indeed! thanks