Skip to content

Commit

Permalink
Merge pull request #958 from McGalanes/main
Browse files Browse the repository at this point in the history
Use typesafe project accessors
  • Loading branch information
dturner authored Oct 4, 2023
2 parents 301661c + b1266dc commit a381d13
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 81 deletions.
4 changes: 2 additions & 2 deletions app-nia-catalog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
44 changes: 22 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ android {

dependencies {
implementation(libs.kotlinx.coroutines.android)
testImplementation(project(":core:testing"))
testImplementation(projects.core.testing)
}
6 changes: 3 additions & 3 deletions core/data-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
18 changes: 9 additions & 9 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
6 changes: 3 additions & 3 deletions core/datastore-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
8 changes: 4 additions & 4 deletions core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
}

dependencies {
lintPublish(project(":lint"))
lintPublish(projects.lint)

api(libs.androidx.compose.foundation)
api(libs.androidx.compose.foundation.layout)
Expand All @@ -42,5 +42,5 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.coil.kt.compose)

androidTestImplementation(project(":core:testing"))
androidTestImplementation(projects.core.testing)
}
6 changes: 3 additions & 3 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
6 changes: 3 additions & 3 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -50,5 +50,5 @@ dependencies {
implementation(libs.retrofit.core)
implementation(libs.retrofit.kotlin.serialization)

testImplementation(project(":core:testing"))
testImplementation(projects.core.testing)
}
4 changes: 2 additions & 2 deletions core/notifications/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions core/testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
10 changes: 5 additions & 5 deletions core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ 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)
implementation(libs.coil.kt)
implementation(libs.coil.kt.compose)
implementation(libs.kotlinx.datetime)

androidTestImplementation(project(":core:testing"))
androidTestImplementation(projects.core.testing)
}
6 changes: 3 additions & 3 deletions feature/search/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ dependencyResolutionManagement {
}
}
rootProject.name = "nowinandroid"

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(":app")
include(":app-nia-catalog")
include(":benchmarks")
Expand Down
6 changes: 3 additions & 3 deletions sync/sync-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
14 changes: 7 additions & 7 deletions sync/work/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}

0 comments on commit a381d13

Please sign in to comment.