From 562a6eb1895e994aa64e9ba6790d7b9e194d11fe Mon Sep 17 00:00:00 2001 From: Tom Tresansky Date: Tue, 14 May 2024 11:47:11 -0400 Subject: [PATCH] Migrate testing deps to new testing block --- core/common/build.gradle.dcl | 12 +++++++----- core/data/build.gradle.dcl | 12 +++++++----- core/domain/build.gradle.dcl | 6 ++++-- feature/bookmarks/build.gradle.dcl | 9 +++++++-- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/core/common/build.gradle.dcl b/core/common/build.gradle.dcl index 8274afded4..35524b5414 100644 --- a/core/common/build.gradle.dcl +++ b/core/common/build.gradle.dcl @@ -1,11 +1,6 @@ androidLibrary { namespace = "com.google.samples.apps.nowinandroid.core.common" - dependencies { - testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") - testImplementation("app.cash.turbine:turbine:1.0.0") - } - buildTypes { buildTypes { // Need the empty closure to avoid "dangling pure expression" error @@ -13,4 +8,11 @@ androidLibrary { release {} } } + + testing { + dependencies { + testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + testImplementation("app.cash.turbine:turbine:1.0.0") + } + } } diff --git a/core/data/build.gradle.dcl b/core/data/build.gradle.dcl index 3815ebff48..c07b830efa 100644 --- a/core/data/build.gradle.dcl +++ b/core/data/build.gradle.dcl @@ -9,11 +9,6 @@ androidLibrary { implementation(project(":core:analytics")) implementation(project(":core:notifications")) - - testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") - testImplementation(project(":core:datastore-test")) - testImplementation(project(":core:testing")) - testImplementation(project(":core:network")) } kotlinSerialization { @@ -28,6 +23,13 @@ androidLibrary { } testing { + dependencies { + testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + testImplementation(project(":core:datastore-test")) + testImplementation(project(":core:testing")) + testImplementation(project(":core:network")) + } + jacoco { version = "0.8.7" } diff --git a/core/domain/build.gradle.dcl b/core/domain/build.gradle.dcl index 785207dad6..e07d6414c7 100644 --- a/core/domain/build.gradle.dcl +++ b/core/domain/build.gradle.dcl @@ -6,8 +6,6 @@ androidLibrary { api(project(":core:data")) api(project(":core:model")) - - testImplementation(project(":core:testing")) } buildTypes { @@ -17,6 +15,10 @@ androidLibrary { } testing { + dependencies { + testImplementation(project(":core:testing")) + } + jacoco { version = "0.8.7" } diff --git a/feature/bookmarks/build.gradle.dcl b/feature/bookmarks/build.gradle.dcl index f9379e71b8..df74cbbcc6 100644 --- a/feature/bookmarks/build.gradle.dcl +++ b/feature/bookmarks/build.gradle.dcl @@ -3,8 +3,6 @@ androidLibrary { dependencies { implementation(project(":core:data")) - testImplementation(project(":core:testing")) - androidTestImplementation(project(":core:testing")) } feature { @@ -14,4 +12,11 @@ androidLibrary { compose { description = "Calling the configure method enables compose support" } + + testing { + dependencies { + testImplementation(project(":core:testing")) + androidTestImplementation(project(":core:testing")) + } + } }