diff --git a/build.gradle.kts b/build.gradle.kts index 3586ee01..e15d1514 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { alias(hilt.android) apply false alias(kotliner) apply false alias(detekt) apply false -// alias(ksp) apply false + alias(ksp) apply false alias(compose) apply false } } diff --git a/data/market-local/build.gradle.kts b/data/market-local/build.gradle.kts index f9b60b16..974676e5 100644 --- a/data/market-local/build.gradle.kts +++ b/data/market-local/build.gradle.kts @@ -1,7 +1,6 @@ plugins { alias(libs.plugins.composenews.android.library) id("composenews.android.hilt") - alias(libs.plugins.sqldelight) } android { @@ -11,20 +10,10 @@ android { namespace = "ir.composenews.localdatasource" } -sqldelight { - databases { - create("MarketDatabase") { - packageName.set("ir.composenews.db") - } - } -} - dependencies { + api(projects.data.sqldelight) libs.apply { - implementation(sqldelight.android) - implementation(sqldelight.coroutines) - testImplementation(sqldelight.test) testImplementation(runner) } projects.apply { diff --git a/data/market-local/src/main/java/ir/composenews/localdatasource/database/MarketDaoImpl.kt b/data/market-local/src/main/java/ir/composenews/localdatasource/database/MarketDaoImpl.kt index 195aaca0..c4eb9cc9 100644 --- a/data/market-local/src/main/java/ir/composenews/localdatasource/database/MarketDaoImpl.kt +++ b/data/market-local/src/main/java/ir/composenews/localdatasource/database/MarketDaoImpl.kt @@ -1,5 +1,6 @@ package ir.composenews.localdatasource.database + import app.cash.sqldelight.coroutines.asFlow import app.cash.sqldelight.coroutines.mapToList import ir.composenews.db.MarketDatabase diff --git a/data/sqldelight/src/main/AndroidManifest.xml b/data/sqldelight/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5918e68 --- /dev/null +++ b/data/sqldelight/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/market-local/src/main/sqldelight/ir/composenews/db/Market.sq b/data/sqldelight/src/main/sqldelight/ir/composenews/db/Market.sq similarity index 100% rename from data/market-local/src/main/sqldelight/ir/composenews/db/Market.sq rename to data/sqldelight/src/main/sqldelight/ir/composenews/db/Market.sq diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 7b8c8fc9..00000000 --- a/settings.gradle +++ /dev/null @@ -1,37 +0,0 @@ -pluginManagement { - includeBuild("build-logic") - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - } -} -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") -rootProject.name = "ComposeNews" -include ':library:designsystem' -include ':library:navigation' -include ':konsist' -include ':core:sync' -include ':core:test' -include ':core:base' -include ':core:uimarket' -include ':core:extensions' -include ':core:network:ktor' -include ':domain:market' -include ':data:market-remote' -include ':data:market-local' -include ':data:market-repository' -include ':feature:marketlist' -include ':feature:marketdetail' -include ':app' -include ':app-watch' -include ':app-watch:app' -include ':app-watch:navigation' -include ':app-watch:ui' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..e78a3863 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,38 @@ +pluginManagement { + includeBuild("build-logic") + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +rootProject.name = "ComposeNews" +include(":library:designsystem") +include(":library:navigation") +include(":konsist") +include(":core:sync") +include(":core:test") +include(":core:base") +include(":core:uimarket") +include(":core:extensions") +include(":core:network:ktor") +include(":domain:market") +include(":data:market-remote") +include(":data:market-local") +include(":data:market-repository") +include(":feature:marketlist") +include(":feature:marketdetail") +include(":app") +include(":app-watch") +include(":app-watch:app") +include(":app-watch:navigation") +include(":app-watch:ui") +include(":data:sqldelight")