diff --git a/app-nia-catalog/build.gradle.kts b/app-nia-catalog/build.gradle.kts index 661fa070c..a90da1604 100644 --- a/app-nia-catalog/build.gradle.kts +++ b/app-nia-catalog/build.gradle.kts @@ -65,7 +65,7 @@ android { } dependencies { - implementation(project(":core:designsystem")) - implementation(project(":core:ui")) + implementation(projects.core.designsystem) + implementation(projects.core.ui) implementation(libs.androidx.activity.compose) } diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2d506242c..1fd5e27a6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -80,31 +80,31 @@ android { } dependencies { - implementation(project(":feature:interests")) - implementation(project(":feature:foryou")) - implementation(project(":feature:bookmarks")) - implementation(project(":feature:topic")) - implementation(project(":feature:search")) - implementation(project(":feature:settings")) + implementation(projects.feature.interests) + implementation(projects.feature.foryou) + implementation(projects.feature.bookmarks) + implementation(projects.feature.topic) + implementation(projects.feature.search) + implementation(projects.feature.settings) - implementation(project(":core:common")) - implementation(project(":core:ui")) - implementation(project(":core:designsystem")) - implementation(project(":core:data")) - implementation(project(":core:model")) - implementation(project(":core:analytics")) + implementation(projects.core.common) + implementation(projects.core.ui) + implementation(projects.core.designsystem) + implementation(projects.core.data) + implementation(projects.core.model) + implementation(projects.core.analytics) - implementation(project(":sync:work")) + implementation(projects.sync.work) - androidTestImplementation(project(":core:testing")) - androidTestImplementation(project(":core:datastore-test")) - androidTestImplementation(project(":core:data-test")) - androidTestImplementation(project(":core:network")) + androidTestImplementation(projects.core.testing) + androidTestImplementation(projects.core.datastoreTest) + androidTestImplementation(projects.core.dataTest) + androidTestImplementation(projects.core.network) androidTestImplementation(libs.androidx.navigation.testing) androidTestImplementation(libs.accompanist.testharness) androidTestImplementation(kotlin("test")) debugImplementation(libs.androidx.compose.ui.testManifest) - debugImplementation(project(":ui-test-hilt-manifest")) + debugImplementation(projects.uiTestHiltManifest) implementation(libs.androidx.activity.compose) implementation(libs.androidx.appcompat) @@ -122,10 +122,10 @@ dependencies { implementation(libs.coil.kt) // Core functions - testImplementation(project(":core:testing")) - testImplementation(project(":core:datastore-test")) - testImplementation(project(":core:data-test")) - testImplementation(project(":core:network")) + testImplementation(projects.core.testing) + testImplementation(projects.core.datastoreTest) + testImplementation(projects.core.dataTest) + testImplementation(projects.core.network) testImplementation(libs.androidx.navigation.testing) testImplementation(libs.accompanist.testharness) testImplementation(libs.work.testing) diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts index da3db3b11..d539d1892 100644 --- a/core/common/build.gradle.kts +++ b/core/common/build.gradle.kts @@ -25,5 +25,5 @@ android { dependencies { implementation(libs.kotlinx.coroutines.android) - testImplementation(project(":core:testing")) + testImplementation(projects.core.testing) } \ No newline at end of file diff --git a/core/data-test/build.gradle.kts b/core/data-test/build.gradle.kts index 5a31f36fb..7ca3ecd0d 100644 --- a/core/data-test/build.gradle.kts +++ b/core/data-test/build.gradle.kts @@ -23,7 +23,7 @@ android { } dependencies { - api(project(":core:data")) - implementation(project(":core:testing")) - implementation(project(":core:common")) + api(projects.core.data) + implementation(projects.core.testing) + implementation(projects.core.common) } diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index f4c417a29..e730a9eb3 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -31,18 +31,18 @@ android { } dependencies { - implementation(project(":core:analytics")) - implementation(project(":core:common")) - implementation(project(":core:database")) - implementation(project(":core:datastore")) - implementation(project(":core:model")) - implementation(project(":core:network")) - implementation(project(":core:notifications")) + implementation(projects.core.analytics) + implementation(projects.core.common) + implementation(projects.core.database) + implementation(projects.core.datastore) + implementation(projects.core.model) + implementation(projects.core.network) + implementation(projects.core.notifications) implementation(libs.androidx.core.ktx) implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.datetime) implementation(libs.kotlinx.serialization.json) - testImplementation(project(":core:datastore-test")) - testImplementation(project(":core:testing")) + testImplementation(projects.core.datastoreTest) + testImplementation(projects.core.testing) } diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index 5e11f207d..a1075286d 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -30,10 +30,10 @@ android { } dependencies { - implementation(project(":core:model")) + implementation(projects.core.model) implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.datetime) - androidTestImplementation(project(":core:testing")) + androidTestImplementation(projects.core.testing) } diff --git a/core/datastore-test/build.gradle.kts b/core/datastore-test/build.gradle.kts index e20e3935b..04b15f044 100644 --- a/core/datastore-test/build.gradle.kts +++ b/core/datastore-test/build.gradle.kts @@ -23,10 +23,10 @@ android { } dependencies { - api(project(":core:datastore")) + api(projects.core.datastore) api(libs.androidx.dataStore.core) implementation(libs.protobuf.kotlin.lite) - implementation(project(":core:common")) - implementation(project(":core:testing")) + implementation(projects.core.common) + implementation(projects.core.testing) } diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index ef52da2e5..f0cc9af47 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -61,12 +61,12 @@ androidComponents.beforeVariants { } dependencies { - implementation(project(":core:common")) - implementation(project(":core:model")) + implementation(projects.core.common) + implementation(projects.core.model) implementation(libs.androidx.dataStore.core) implementation(libs.kotlinx.coroutines.android) implementation(libs.protobuf.kotlin.lite) - testImplementation(project(":core:datastore-test")) - testImplementation(project(":core:testing")) + testImplementation(projects.core.datastoreTest) + testImplementation(projects.core.testing) } diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index 98bead9ab..7bd1d12d8 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -27,7 +27,7 @@ android { } dependencies { - lintPublish(project(":lint")) + lintPublish(projects.lint) api(libs.androidx.compose.foundation) api(libs.androidx.compose.foundation.layout) @@ -42,5 +42,5 @@ dependencies { implementation(libs.androidx.core.ktx) implementation(libs.coil.kt.compose) - androidTestImplementation(project(":core:testing")) + androidTestImplementation(projects.core.testing) } diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 0f0ef4fbf..78cf5187a 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -24,13 +24,13 @@ android { } dependencies { - implementation(project(":core:data")) - implementation(project(":core:model")) + implementation(projects.core.data) + implementation(projects.core.model) implementation(libs.hilt.android) implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.datetime) kapt(libs.hilt.compiler) - testImplementation(project(":core:testing")) + testImplementation(projects.core.testing) } \ No newline at end of file diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 082345e6e..dce97031f 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -39,8 +39,8 @@ secrets { } dependencies { - implementation(project(":core:common")) - implementation(project(":core:model")) + implementation(projects.core.common) + implementation(projects.core.model) implementation(libs.coil.kt) implementation(libs.coil.kt.svg) implementation(libs.kotlinx.coroutines.android) @@ -50,5 +50,5 @@ dependencies { implementation(libs.retrofit.core) implementation(libs.retrofit.kotlin.serialization) - testImplementation(project(":core:testing")) + testImplementation(projects.core.testing) } diff --git a/core/notifications/build.gradle.kts b/core/notifications/build.gradle.kts index 0d6e92ec6..31b15a805 100644 --- a/core/notifications/build.gradle.kts +++ b/core/notifications/build.gradle.kts @@ -24,8 +24,8 @@ android { } dependencies { - implementation(project(":core:common")) - implementation(project(":core:model")) + implementation(projects.core.common) + implementation(projects.core.model) implementation(libs.kotlinx.coroutines.android) implementation(libs.androidx.browser) diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts index a85eb713a..8ad91a0d5 100644 --- a/core/testing/build.gradle.kts +++ b/core/testing/build.gradle.kts @@ -40,12 +40,12 @@ dependencies { debugApi(libs.androidx.compose.ui.testManifest) - implementation(project(":core:common")) - implementation(project(":core:data")) - implementation(project(":core:designsystem")) - implementation(project(":core:domain")) - implementation(project(":core:model")) - implementation(project(":core:notifications")) - implementation(project(":core:analytics")) + implementation(projects.core.common) + implementation(projects.core.data) + implementation(projects.core.designsystem) + implementation(projects.core.domain) + implementation(projects.core.model) + implementation(projects.core.notifications) + implementation(projects.core.analytics) implementation(libs.kotlinx.datetime) } diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 8986c19e3..c9527d09e 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -40,10 +40,10 @@ dependencies { debugApi(libs.androidx.compose.ui.tooling) - implementation(project(":core:analytics")) - implementation(project(":core:designsystem")) - implementation(project(":core:domain")) - implementation(project(":core:model")) + implementation(projects.core.analytics) + implementation(projects.core.designsystem) + implementation(projects.core.domain) + implementation(projects.core.model) implementation(libs.androidx.activity.compose) implementation(libs.androidx.browser) implementation(libs.androidx.core.ktx) @@ -51,5 +51,5 @@ dependencies { implementation(libs.coil.kt.compose) implementation(libs.kotlinx.datetime) - androidTestImplementation(project(":core:testing")) + androidTestImplementation(projects.core.testing) } diff --git a/feature/search/build.gradle.kts b/feature/search/build.gradle.kts index 2bfd65527..d96f290e3 100644 --- a/feature/search/build.gradle.kts +++ b/feature/search/build.gradle.kts @@ -25,9 +25,9 @@ android { } dependencies { - implementation(project(":feature:bookmarks")) - implementation(project(":feature:foryou")) - implementation(project(":feature:interests")) + implementation(projects.feature.bookmarks) + implementation(projects.feature.foryou) + implementation(projects.feature.interests) implementation(libs.kotlinx.datetime) } diff --git a/settings.gradle.kts b/settings.gradle.kts index d0c477b3d..8a72d695a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,6 +31,8 @@ dependencyResolutionManagement { } } rootProject.name = "nowinandroid" + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") include(":app") include(":app-nia-catalog") include(":benchmarks") diff --git a/sync/sync-test/build.gradle.kts b/sync/sync-test/build.gradle.kts index 003239898..02e573ae5 100644 --- a/sync/sync-test/build.gradle.kts +++ b/sync/sync-test/build.gradle.kts @@ -23,7 +23,7 @@ android { } dependencies { - api(project(":sync:work")) - implementation(project(":core:data")) - implementation(project(":core:testing")) + api(projects.sync.work) + implementation(projects.core.data) + implementation(projects.core.testing) } diff --git a/sync/work/build.gradle.kts b/sync/work/build.gradle.kts index 2dc02674d..bf1943e5a 100644 --- a/sync/work/build.gradle.kts +++ b/sync/work/build.gradle.kts @@ -27,11 +27,11 @@ android { } dependencies { - implementation(project(":core:analytics")) - implementation(project(":core:common")) - implementation(project(":core:data")) - implementation(project(":core:datastore")) - implementation(project(":core:model")) + implementation(projects.core.analytics) + implementation(projects.core.common) + implementation(projects.core.data) + implementation(projects.core.datastore) + implementation(projects.core.model) implementation(libs.androidx.lifecycle.livedata.ktx) implementation(libs.androidx.tracing.ktx) implementation(libs.androidx.work.ktx) @@ -41,8 +41,8 @@ dependencies { kapt(libs.hilt.ext.compiler) - testImplementation(project(":core:testing")) + testImplementation(projects.core.testing) - androidTestImplementation(project(":core:testing")) + androidTestImplementation(projects.core.testing) androidTestImplementation(libs.androidx.work.testing) }