I'm using SQLDelight on Android and started reading about SQLDelight's Gradle DSL so that I could generate a database schema and prepare for a small migration.
I've been working with pretty much all default configuration, so I added this very minimal sqldelight
block to my build.gradle
:
sqldelight {
Database {
schemaOutputDirectory = file("src/main/sqldelight")
}
}
After I added this block, I noticed the generate*DatabaseSchema
tasks show up in my Gradle task list as expected. However, when I run the generateDebugDatabaseSchema
task it consistently fails with this exception:
* What went wrong:
Execution failed for task ':app:generateDebugDatabaseSchema'.
> Please use the ObjectFactory.listProperty() method to create a property of type List<T>.
Is there more I need to include within the sqldelight
block for things to work properly? Can sqldelight
be on its own, or does it need to be moved inside of android
, buildscript
, or some other part of the build file for things to work?