sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

Set linkSqlite = true only when using sqlite dialect

Open hfhbd opened this issue 2 years ago • 0 comments

SQLDelight Version

2.0.0-SNAPSHOT

Operating System

macOS 13

Gradle Version

7.4.2

Kotlin Version

1.7.0

Dialect

Postgresql

AGP Version

No response

Describe the Bug

https://github.com/cashapp/sqldelight/blob/master/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/SqlDelightExtension.kt#L12 is active by default, so custom native driver not using sqlite dialect needs to disable linking explicitly otherwise linking fails with: sqlite not found.

Example: https://github.com/hfhbd/postgres-native-sqldelight/blob/main/testing/build.gradle.kts

Stacktrace

No response

Gradle Build Script

sqldelight {
    database("NativePostgres") {
        dialect(projects.postgresNativeSqldelightDialect)
        packageName = "app.softwork.sqldelight.postgresdriver"
        deriveSchemaFromMigrations = true
    }
    linkSqlite = false
}

hfhbd avatar Jun 17 '22 16:06 hfhbd