diff --git a/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/android/PackageName.kt b/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/android/PackageName.kt index a87cfa81730..834bc61cf4c 100644 --- a/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/android/PackageName.kt +++ b/sqldelight-gradle-plugin/src/main/kotlin/app/cash/sqldelight/gradle/android/PackageName.kt @@ -29,6 +29,9 @@ internal fun Project.packageName(): String { internal fun Project.sqliteVersion(): String? { val androidExtension = extensions.getByType(BaseExtension::class.java) val minSdk = androidExtension.defaultConfig.minSdk ?: return null + + // Mapping available at https://developer.android.com/reference/android/database/sqlite/package-summary. + if (minSdk >= 34) return "app.cash.sqldelight:sqlite-3-38-dialect:$VERSION" if (minSdk >= 31) return "app.cash.sqldelight:sqlite-3-30-dialect:$VERSION" if (minSdk >= 30) return "app.cash.sqldelight:sqlite-3-25-dialect:$VERSION" return "app.cash.sqldelight:sqlite-3-18-dialect:$VERSION"