diff --git a/core/common/build.gradle.dcl b/core/common/build.gradle.dcl index 8274afded..327be1a1b 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 { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + implementation("app.cash.turbine:turbine:1.0.0") + } + } } diff --git a/core/data/build.gradle.dcl b/core/data/build.gradle.dcl index 3815ebff4..2ea4315e9 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 { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + implementation(project(":core:datastore-test")) + implementation(project(":core:testing")) + implementation(project(":core:network")) + } + jacoco { version = "0.8.7" } diff --git a/core/domain/build.gradle.dcl b/core/domain/build.gradle.dcl index 785207dad..bb32ab6de 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 { + implementation(project(":core:testing")) + } + jacoco { version = "0.8.7" } diff --git a/feature/bookmarks/build.gradle.dcl b/feature/bookmarks/build.gradle.dcl index f9379e71b..991a08c17 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 { + implementation(project(":core:testing")) + androidImplementation(project(":core:testing")) + } + } }