bump: sqldelight.
All checks were successful
Check PR code / Lint (pull_request) Successful in 1m47s
Check PR code / build (pull_request) Successful in 15m9s

This commit is contained in:
Amine Bouabdallaoui 2024-12-31 12:37:25 +01:00
parent 03c567ee33
commit ae81261cb1
9 changed files with 31 additions and 29 deletions

View File

@ -9,6 +9,7 @@ plugins {
kotlin("kapt") kotlin("kapt")
id("com.mikepenz.aboutlibraries.plugin") id("com.mikepenz.aboutlibraries.plugin")
id("org.jetbrains.kotlinx.kover") id("org.jetbrains.kotlinx.kover")
id("app.cash.sqldelight") version "2.0.2"
} }
fun Project.execWithOutput(cmd: String, ignore: Boolean = false): String { fun Project.execWithOutput(cmd: String, ignore: Boolean = false): String {
@ -183,7 +184,7 @@ dependencies {
implementation("com.github.ln-12:multiplatform-connectivity-status:1.3.0") implementation("com.github.ln-12:multiplatform-connectivity-status:1.3.0")
// SQLDELIGHT // SQLDELIGHT
implementation("com.squareup.sqldelight:android-driver:1.5.4") implementation("app.cash.sqldelight:android-driver:2.0.2")
//test //test
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")

View File

@ -1,10 +1,3 @@
buildscript {
dependencies {
// SqlDelight
classpath("com.squareup.sqldelight:gradle-plugin:1.5.5")
}
}
plugins { plugins {
//trick: for the same plugin versions in all sub-modules //trick: for the same plugin versions in all sub-modules
id("com.android.application").version("8.7.3").apply(false) id("com.android.application").version("8.7.3").apply(false)

View File

@ -1,18 +1,18 @@
val ktorVersion = "3.0.3" val ktorVersion = "3.0.3"
object SqlDelight { object SqlDelight {
const val runtime = "com.squareup.sqldelight:runtime:1.5.4" const val runtime = "app.cash.sqldelight:runtime:2.0.2"
const val android = "com.squareup.sqldelight:android-driver:1.5.4" const val android = "app.cash.sqldelight:android-driver:2.0.2"
const val native = "com.squareup.sqldelight:native-driver:1.5.4" const val native = "app.cash.sqldelight:native-driver:2.0.2"
} }
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("com.android.library") id("com.android.library")
id("com.squareup.sqldelight")
kotlin("plugin.serialization") version "1.9.0" kotlin("plugin.serialization") version "1.9.0"
id("org.jetbrains.kotlinx.kover") id("org.jetbrains.kotlinx.kover")
id("app.cash.sqldelight") version "2.0.2"
} }
kotlin { kotlin {
@ -108,11 +108,10 @@ android {
namespace = "bou.amine.apps.readerforselfossv2" namespace = "bou.amine.apps.readerforselfossv2"
} }
sqldelight { sqldelight {
database("ReaderForSelfossDB") { databases {
packageName = "bou.amine.apps.readerforselfossv2.dao" create("ReaderForSelfossDB") {
sourceFolders = listOf("sqldelight") packageName.set("bou.amine.apps.readerforselfossv2.dao")
}
} }
} }

View File

@ -1,10 +1,15 @@
package bou.amine.apps.readerforselfossv2.dao package bou.amine.apps.readerforselfossv2.dao
import android.content.Context import android.content.Context
import com.squareup.sqldelight.android.AndroidSqliteDriver import app.cash.sqldelight.db.SqlDriver
import com.squareup.sqldelight.db.SqlDriver import app.cash.sqldelight.driver.android.AndroidSqliteDriver
actual class DriverFactory(private val context: Context) { actual class DriverFactory(private val context: Context) {
actual fun createDriver(): SqlDriver { actual fun createDriver(): SqlDriver {
return AndroidSqliteDriver(ReaderForSelfossDB.Schema, context, "ReaderForSelfossV2-android.db") return AndroidSqliteDriver(
ReaderForSelfossDB.Schema,
context,
"ReaderForSelfossV2-android.db"
)
} }
} }

View File

@ -1,6 +1,6 @@
package bou.amine.apps.readerforselfossv2.dao package bou.amine.apps.readerforselfossv2.dao
import com.squareup.sqldelight.db.SqlDriver import app.cash.sqldelight.db.SqlDriver
expect class DriverFactory { expect class DriverFactory {
fun createDriver(): SqlDriver fun createDriver(): SqlDriver

View File

@ -1,3 +1,5 @@
import kotlin.Boolean;
CREATE TABLE `ACTION` ( CREATE TABLE `ACTION` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`articleid` TEXT NOT NULL, `articleid` TEXT NOT NULL,

View File

@ -1,3 +1,5 @@
import kotlin.Boolean;
CREATE TABLE ITEM ( CREATE TABLE ITEM (
`id` TEXT NOT NULL, `id` TEXT NOT NULL,
`datetime` TEXT NOT NULL, `datetime` TEXT NOT NULL,

View File

@ -1,7 +1,7 @@
package bou.amine.apps.readerforselfossv2.dao package bou.amine.apps.readerforselfossv2.dao
import com.squareup.sqldelight.db.SqlDriver import app.cash.sqldelight.db.SqlDriver
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver import app.cash.sqldelight.driver.native.NativeSqliteDriver
actual class DriverFactory { actual class DriverFactory {
actual fun createDriver(): SqlDriver { actual fun createDriver(): SqlDriver {

View File

@ -1,7 +1,7 @@
package bou.amine.apps.readerforselfossv2.dao package bou.amine.apps.readerforselfossv2.dao
import com.squareup.sqldelight.db.SqlDriver import app.cash.sqldelight.db.SqlDriver
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver import app.cash.sqldelight.driver.native.NativeSqliteDriver
actual class DriverFactory { actual class DriverFactory {
actual fun createDriver(): SqlDriver { actual fun createDriver(): SqlDriver {