Skip to content

Commit

Permalink
Merge pull request #80 from piloudu/Type-safe-Gradle-projects
Browse files Browse the repository at this point in the history
Implement type-safe accessors for the project implementations in Gradle files
  • Loading branch information
skydoves authored Apr 4, 2023
2 parents 1b3e0a1 + 034c485 commit 8ac703d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ android {

dependencies {
// modules
implementation(project(":core-data"))
implementation(projects.coreData)

// modules for unit test
testImplementation(project(":core-network"))
testImplementation(project(":core-database"))
testImplementation(project(":core-test"))
androidTestImplementation(project(":core-test"))
testImplementation(projects.coreNetwork)
testImplementation(projects.coreDatabase)
testImplementation(projects.coreTest)
androidTestImplementation(projects.coreTest)

// androidx
implementation(libs.material)
Expand Down
8 changes: 4 additions & 4 deletions core-data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ android {
}

dependencies {
api(project(":core-model"))
implementation(project(":core-network"))
implementation(project(":core-database"))
testImplementation(project(":core-test"))
api(projects.coreModel)
implementation(projects.coreNetwork)
implementation(projects.coreDatabase)
testImplementation(projects.coreTest)

// coroutines
implementation(libs.coroutines)
Expand Down
4 changes: 2 additions & 2 deletions core-database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ android {
}

dependencies {
implementation(project(":core-model"))
testImplementation(project(":core-test"))
implementation(projects.coreModel)
testImplementation(projects.coreTest)

// coroutines
implementation(libs.coroutines)
Expand Down
4 changes: 2 additions & 2 deletions core-network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ android {
}

dependencies {
implementation(project(":core-model"))
testImplementation(project(":core-test"))
implementation(projects.coreModel)
testImplementation(projects.coreTest)

// coroutines
implementation(libs.coroutines)
Expand Down
2 changes: 1 addition & 1 deletion core-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
}

dependencies {
implementation(project(":core-model"))
implementation(projects.coreModel)
implementation(libs.coroutines)
implementation(libs.coroutines.test)
implementation(libs.junit)
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//See the License for the specific language governing permissions and
//limitations under the License.

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
repositories {
google()
Expand Down

0 comments on commit 8ac703d

Please # to comment.