Hello all, I'm trying to setup SQLDelight for a Compose project (Kotlin).
When I follow the
website I'm getting stuck at configuring the database.
I have done the following:
1. imported the gradle plugin
plugins {
kotlin("jvm") version "1.5.31"
id("org.jetbrains.compose") version "1.0.0-beta5"
id("com.squareup.sqldelight") version "1.5.2"
}
2. added the driver dependency
dependencies {
implementation(compose.desktop.currentOs)
implementation("com.squareup.sqldelight:sqlite-driver:1.5.2")
testImplementation(kotlin("test"))
}
3. now I'm trying to add the configuration for the gradle-plugin
sqldelight {
Database { // This will be the name of the generated database class.
packageName = "com.example"
}
}
But I get error
sqldelight {
sqldelight.com.squareup.sqlite.migrations.Database {
}
}
The error:
build.gradle.kts:47:16: Unresolved reference: com
SQLDelight Gradle plugin was applied but there are no databases set up.
Seems like I'm not able to add Database like that (com is pointing out to the package name and marked red in my Intellij). If I remove the package name (sqldelight.
com
.squareup.sqlite.migrations) it does not work.
Hope someone can help me out with this?