bump: sqldelight.
This commit is contained in:
parent
03c567ee33
commit
ae81261cb1
@ -9,6 +9,7 @@ plugins {
|
||||
kotlin("kapt")
|
||||
id("com.mikepenz.aboutlibraries.plugin")
|
||||
id("org.jetbrains.kotlinx.kover")
|
||||
id("app.cash.sqldelight") version "2.0.2"
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
// SQLDELIGHT
|
||||
implementation("com.squareup.sqldelight:android-driver:1.5.4")
|
||||
implementation("app.cash.sqldelight:android-driver:2.0.2")
|
||||
|
||||
//test
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
|
@ -1,10 +1,3 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
// SqlDelight
|
||||
classpath("com.squareup.sqldelight:gradle-plugin:1.5.5")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
//trick: for the same plugin versions in all sub-modules
|
||||
id("com.android.application").version("8.7.3").apply(false)
|
||||
|
@ -1,18 +1,18 @@
|
||||
val ktorVersion = "3.0.3"
|
||||
|
||||
object SqlDelight {
|
||||
const val runtime = "com.squareup.sqldelight:runtime:1.5.4"
|
||||
const val android = "com.squareup.sqldelight:android-driver:1.5.4"
|
||||
const val native = "com.squareup.sqldelight:native-driver:1.5.4"
|
||||
const val runtime = "app.cash.sqldelight:runtime:2.0.2"
|
||||
const val android = "app.cash.sqldelight:android-driver:2.0.2"
|
||||
const val native = "app.cash.sqldelight:native-driver:2.0.2"
|
||||
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("com.android.library")
|
||||
id("com.squareup.sqldelight")
|
||||
kotlin("plugin.serialization") version "1.9.0"
|
||||
id("org.jetbrains.kotlinx.kover")
|
||||
id("app.cash.sqldelight") version "2.0.2"
|
||||
}
|
||||
|
||||
kotlin {
|
||||
@ -108,11 +108,10 @@ android {
|
||||
namespace = "bou.amine.apps.readerforselfossv2"
|
||||
}
|
||||
|
||||
|
||||
|
||||
sqldelight {
|
||||
database("ReaderForSelfossDB") {
|
||||
packageName = "bou.amine.apps.readerforselfossv2.dao"
|
||||
sourceFolders = listOf("sqldelight")
|
||||
databases {
|
||||
create("ReaderForSelfossDB") {
|
||||
packageName.set("bou.amine.apps.readerforselfossv2.dao")
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,15 @@
|
||||
package bou.amine.apps.readerforselfossv2.dao
|
||||
|
||||
import android.content.Context
|
||||
import com.squareup.sqldelight.android.AndroidSqliteDriver
|
||||
import com.squareup.sqldelight.db.SqlDriver
|
||||
import app.cash.sqldelight.db.SqlDriver
|
||||
import app.cash.sqldelight.driver.android.AndroidSqliteDriver
|
||||
|
||||
actual class DriverFactory(private val context: Context) {
|
||||
actual fun createDriver(): SqlDriver {
|
||||
return AndroidSqliteDriver(ReaderForSelfossDB.Schema, context, "ReaderForSelfossV2-android.db")
|
||||
return AndroidSqliteDriver(
|
||||
ReaderForSelfossDB.Schema,
|
||||
context,
|
||||
"ReaderForSelfossV2-android.db"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package bou.amine.apps.readerforselfossv2.dao
|
||||
|
||||
import com.squareup.sqldelight.db.SqlDriver
|
||||
import app.cash.sqldelight.db.SqlDriver
|
||||
|
||||
expect class DriverFactory {
|
||||
fun createDriver(): SqlDriver
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
import kotlin.Boolean;
|
||||
|
||||
CREATE TABLE `ACTION` (
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`articleid` TEXT NOT NULL,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import kotlin.Boolean;
|
||||
|
||||
CREATE TABLE ITEM (
|
||||
`id` TEXT NOT NULL,
|
||||
`datetime` TEXT NOT NULL,
|
||||
|
@ -1,10 +1,10 @@
|
||||
package bou.amine.apps.readerforselfossv2.dao
|
||||
|
||||
import com.squareup.sqldelight.db.SqlDriver
|
||||
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
|
||||
import app.cash.sqldelight.db.SqlDriver
|
||||
import app.cash.sqldelight.driver.native.NativeSqliteDriver
|
||||
|
||||
actual class DriverFactory {
|
||||
actual fun createDriver(): SqlDriver {
|
||||
return NativeSqliteDriver(ReaderForSelfossDB.Schema, "ReaderForSelfossV2-IOS.db")
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
package bou.amine.apps.readerforselfossv2.dao
|
||||
|
||||
import com.squareup.sqldelight.db.SqlDriver
|
||||
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
|
||||
import app.cash.sqldelight.db.SqlDriver
|
||||
import app.cash.sqldelight.driver.native.NativeSqliteDriver
|
||||
|
||||
actual class DriverFactory {
|
||||
actual fun createDriver(): SqlDriver {
|
||||
return NativeSqliteDriver(ReaderForSelfossDB.Schema, "ReaderForSelfossV2-IOS.db")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user