mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 18:47:03 +05:30
refactor(database): split out JVM and Android parts
This commit is contained in:
parent
1b1984064c
commit
7b0b206905
31 changed files with 33 additions and 19 deletions
|
@ -90,7 +90,7 @@ dependencies {
|
||||||
implementation(projects.api)
|
implementation(projects.api)
|
||||||
implementation(projects.common)
|
implementation(projects.common)
|
||||||
implementation(projects.core)
|
implementation(projects.core)
|
||||||
implementation(projects.database)
|
implementation(projects.database.impl)
|
||||||
implementation(projects.model)
|
implementation(projects.model)
|
||||||
|
|
||||||
kapt(libs.dagger.compiler)
|
kapt(libs.dagger.compiler)
|
||||||
|
|
|
@ -33,7 +33,7 @@ anvil { generateDaggerFactories.set(true) }
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.core)
|
api(projects.core)
|
||||||
api(projects.database)
|
api(projects.database.core)
|
||||||
api(projects.model)
|
api(projects.model)
|
||||||
|
|
||||||
implementation(platform(libs.androidx.compose.bom))
|
implementation(platform(libs.androidx.compose.bom))
|
||||||
|
|
22
database/core/build.gradle.kts
Normal file
22
database/core/build.gradle.kts
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2021-2023 Harsh Shandilya.
|
||||||
|
* Use of this source code is governed by an MIT-style
|
||||||
|
* license that can be found in the LICENSE file or at
|
||||||
|
* https://opensource.org/licenses/MIT.
|
||||||
|
*/
|
||||||
|
import dev.msfjarvis.claw.gradle.addTestDependencies
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("dev.msfjarvis.claw.kotlin-jvm")
|
||||||
|
alias(libs.plugins.sqldelight)
|
||||||
|
}
|
||||||
|
|
||||||
|
sqldelight {
|
||||||
|
databases {
|
||||||
|
create("LobstersDatabase") {
|
||||||
|
packageName.set("dev.msfjarvis.claw.database")
|
||||||
|
schemaOutputDirectory.set(file("src/main/sqldelight/databases"))
|
||||||
|
verifyMigrations.set(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
database/core/lint-baseline.xml
Normal file
4
database/core/lint-baseline.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<issues format="6" by="lint 8.3.0-alpha05" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0-alpha05)" variant="all" version="8.3.0-alpha05">
|
||||||
|
|
||||||
|
</issues>
|
|
@ -11,7 +11,6 @@ plugins {
|
||||||
id("dev.msfjarvis.claw.kotlin-android")
|
id("dev.msfjarvis.claw.kotlin-android")
|
||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
alias(libs.plugins.anvil)
|
alias(libs.plugins.anvil)
|
||||||
alias(libs.plugins.sqldelight)
|
|
||||||
alias(libs.plugins.whetstone)
|
alias(libs.plugins.whetstone)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,17 +18,8 @@ android { namespace = "dev.msfjarvis.claw.database" }
|
||||||
|
|
||||||
anvil { generateDaggerFactories.set(true) }
|
anvil { generateDaggerFactories.set(true) }
|
||||||
|
|
||||||
sqldelight {
|
|
||||||
databases {
|
|
||||||
create("LobstersDatabase") {
|
|
||||||
packageName.set("dev.msfjarvis.claw.database")
|
|
||||||
schemaOutputDirectory.set(file("src/main/sqldelight/databases"))
|
|
||||||
verifyMigrations.set(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
api(projects.database.core)
|
||||||
implementation(libs.dagger)
|
implementation(libs.dagger)
|
||||||
implementation(libs.sqldelight.androidDriver)
|
implementation(libs.sqldelight.androidDriver)
|
||||||
implementation(libs.sqldelight.primitiveAdapters)
|
implementation(libs.sqldelight.primitiveAdapters)
|
|
@ -5,19 +5,16 @@
|
||||||
* https://opensource.org/licenses/MIT.
|
* https://opensource.org/licenses/MIT.
|
||||||
*/
|
*/
|
||||||
plugins {
|
plugins {
|
||||||
id("dev.msfjarvis.claw.android-library")
|
id("dev.msfjarvis.claw.kotlin-jvm")
|
||||||
id("dev.msfjarvis.claw.kotlin-android")
|
|
||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
alias(libs.plugins.poko)
|
alias(libs.plugins.poko)
|
||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android { namespace = "dev.msfjarvis.claw.model" }
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.kotlinx.serialization.core)
|
implementation(libs.kotlinx.serialization.core)
|
||||||
implementation(libs.konvert.api)
|
implementation(libs.konvert.api)
|
||||||
implementation(projects.database)
|
implementation(projects.database.core)
|
||||||
|
|
||||||
ksp(libs.konvert.processor)
|
ksp(libs.konvert.processor)
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,7 @@ include(
|
||||||
"benchmark",
|
"benchmark",
|
||||||
"common",
|
"common",
|
||||||
"core",
|
"core",
|
||||||
"database",
|
"database:core",
|
||||||
|
"database:impl",
|
||||||
"model",
|
"model",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue