From 61c57dae6a3844b54e66746234b4b623d913c36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Wed, 31 Jan 2024 16:15:35 +0100 Subject: [PATCH] Update test dependencies declarations --- gradle/libs.versions.toml | 5 +++-- pillarbox-analytics/build.gradle.kts | 5 +++-- pillarbox-core-business/build.gradle.kts | 6 +++--- pillarbox-player/build.gradle.kts | 9 ++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1c77a09ef..2381aa546 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -60,7 +60,7 @@ androidx-navigation-runtime = { module = "androidx.navigation:navigation-runtime androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" } androidx-paging-common = { module = "androidx.paging:paging-common", version.ref = "androidx-paging" } androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "androidx-paging" } -androidx-test-core = { module = "androidx.test:core-ktx", version.ref = "androidx-test-core" } +androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" } androidx-test-monitor = { module = "androidx.test:monitor", version.ref = "androidx-test-monitor" } androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } androidx-tv-foundation = { module = "androidx.tv:tv-foundation", version.ref = "androidx-tv" } @@ -80,6 +80,8 @@ ktor-serialization = { module = "io.ktor:ktor-serialization", version.ref = "kto ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } ktor-utils = { module = "io.ktor:ktor-utils", version.ref = "ktor" } robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } +robolectric-annotations = { module = "org.robolectric:annotations", version.ref = "robolectric" } +robolectric-shadows-framework = { module = "org.robolectric:shadows-framework", version.ref = "robolectric" } srg-data = { module = "ch.srg.data.provider:data", version.ref = "srg-data-provider" } srg-dataprovider-paging = { module = "ch.srg.data.provider:dataprovider-paging", version.ref = "srg-data-provider" } srg-dataprovider-retrofit = { module = "ch.srg.data.provider:dataprovider-retrofit", version.ref = "srg-data-provider" } @@ -127,7 +129,6 @@ androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable" } leanback = { group = "androidx.leanback", name = "leanback", version.ref = "androidx-leanback" } androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" } -androidx-test-ext-junit-ktx = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidx-test-ext-junit" } guava = { module = "com.google.guava:guava", version.ref = "guava" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } diff --git a/pillarbox-analytics/build.gradle.kts b/pillarbox-analytics/build.gradle.kts index b6e328946..94e4207a5 100644 --- a/pillarbox-analytics/build.gradle.kts +++ b/pillarbox-analytics/build.gradle.kts @@ -63,7 +63,7 @@ dependencies { api(libs.tagcommander.serverside) testImplementation(libs.androidx.test.core) - testImplementation(libs.androidx.test.ext.junit.ktx) + testImplementation(libs.androidx.test.ext.junit) testImplementation(libs.json) { because("The 'org.json' package is included in the Android SDK. Adding this dependency allows us to not mock the Android SDK in unit tests.") } @@ -71,7 +71,8 @@ dependencies { testImplementation(libs.kotlin.test) testImplementation(libs.mockk) testImplementation(libs.mockk.dsl) - testImplementation(libs.robolectric) + testRuntimeOnly(libs.robolectric) + testImplementation(libs.robolectric.annotations) } kover { diff --git a/pillarbox-core-business/build.gradle.kts b/pillarbox-core-business/build.gradle.kts index c9edf43d8..9e95fc0a1 100644 --- a/pillarbox-core-business/build.gradle.kts +++ b/pillarbox-core-business/build.gradle.kts @@ -73,15 +73,15 @@ dependencies { implementation(libs.okhttp.logging.interceptor) api(libs.tagcommander.core) - testImplementation(libs.androidx.test.core) - testImplementation(libs.androidx.test.ext.junit.ktx) + testRuntimeOnly(libs.androidx.test.core) + testImplementation(libs.androidx.test.ext.junit) testImplementation(libs.junit) testImplementation(libs.kotlin.test) testImplementation(libs.kotlinx.coroutines.test) testImplementation(libs.ktor.client.mock) testImplementation(libs.mockk) testImplementation(libs.mockk.dsl) - testImplementation(libs.robolectric) + testRuntimeOnly(libs.robolectric) androidTestImplementation(project(":pillarbox-player-testutils")) diff --git a/pillarbox-player/build.gradle.kts b/pillarbox-player/build.gradle.kts index 09804c855..fe8a374c8 100644 --- a/pillarbox-player/build.gradle.kts +++ b/pillarbox-player/build.gradle.kts @@ -83,17 +83,17 @@ dependencies { testImplementation(project(":pillarbox-player-testutils")) testImplementation(libs.androidx.test.core) - testImplementation(libs.androidx.test.ext.junit.ktx) + testImplementation(libs.androidx.test.ext.junit) testImplementation(libs.junit) testImplementation(libs.kotlin.test) testImplementation(libs.kotlinx.coroutines.test) testImplementation(libs.mockk) testImplementation(libs.mockk.dsl) - testImplementation(libs.robolectric) + testRuntimeOnly(libs.robolectric) + testImplementation(libs.robolectric.annotations) + testImplementation(libs.robolectric.shadows.framework) testImplementation(libs.turbine) - androidTestImplementation(project(":pillarbox-player-testutils")) - androidTestImplementation(libs.androidx.test.ext.junit) androidTestImplementation(libs.androidx.test.monitor) androidTestRuntimeOnly(libs.androidx.test.runner) @@ -101,7 +101,6 @@ dependencies { androidTestRuntimeOnly(libs.kotlinx.coroutines.android) androidTestImplementation(libs.mockk) androidTestImplementation(libs.mockk.android) - androidTestImplementation(libs.mockk.dsl) } kover {