最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

gradle - no generateSqlDelightSchema task SQLDelight - Stack Overflow

programmeradmin1浏览0评论

I am using migrations for my SQLDelight KMM database. They seem to work fine, however, I would like to also verify them as described in the docs. For some reason I do not see the generateSqlDelightSchema task as described there. This is the relevant part of my gradle file:

sqldelight {
    databases {
        create("ContentHuntDatabase") {
            packageName = "com.xamoom.contenthunt.data"
            schemaOutputDirectory = file("src/commonMain/sqldelight/com/xamoom/contenthunt/data")
            deriveSchemaFromMigrations = true
            verifyMigrations = true
            generateAsync = true
        }
    }
}

Any ideas on why I do not see the task?

I am using migrations for my SQLDelight KMM database. They seem to work fine, however, I would like to also verify them as described in the docs. For some reason I do not see the generateSqlDelightSchema task as described there. This is the relevant part of my gradle file:

sqldelight {
    databases {
        create("ContentHuntDatabase") {
            packageName = "com.xamoom.contenthunt.data"
            schemaOutputDirectory = file("src/commonMain/sqldelight/com/xamoom/contenthunt/data")
            deriveSchemaFromMigrations = true
            verifyMigrations = true
            generateAsync = true
        }
    }
}

Any ideas on why I do not see the task?

Share Improve this question asked Nov 19, 2024 at 9:30 Ge ProhaskaGe Prohaska 335 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It seems like the SQLDelight documentation is a bit out of date.

Now, SQLDelight generates a task called generate${targetName}${databaseName}Schema. For example, mine is generateCommonMainAppDatabaseSchema.

You can see all the tasks available by running this command: gradlew tasks. In the results, search for "Sqldelight tasks" and you will find all the tasks created by SQLDelight.

发布评论

评论列表(0)

  1. 暂无评论