Humphrey
11/23/2021, 4:46 PMplugins {
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?mbonnin
11/23/2021, 4:48 PMbuild.gradle.kts
? If that's the case, use database("Database")
insteadmbonnin
11/23/2021, 4:49 PMcreate
by database
above)Humphrey
11/23/2021, 4:49 PMmbonnin
11/23/2021, 4:49 PMmbonnin
11/23/2021, 4:49 PMmbonnin
11/23/2021, 4:50 PMsqldelight {
database("Database") {
packageName = "com.example"
}
}
Humphrey
11/23/2021, 4:50 PMsaket
11/24/2021, 2:08 AMHumphrey
11/24/2021, 6:58 AMsaket
11/24/2021, 7:05 AMsaket
11/24/2021, 7:06 AM