From 8c3ec9a40d7e501282912854665bcc5b4b7fbe10 Mon Sep 17 00:00:00 2001 From: Kirill Kamakin Date: Tue, 6 Dec 2022 20:32:28 +0100 Subject: [PATCH] Enable AndroidX test orchestrator --- app/build.gradle.kts | 6 ++++++ gradle/libs.versions.toml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ea97c39..602fbc3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -18,6 +18,7 @@ android { versionCode = 25 versionName = "0.3.10" testInstrumentationRunner = "gq.kirmanak.mealient.MealientTestRunner" + testInstrumentationRunnerArguments += mapOf("clearPackageData" to "true") } signingConfigs { @@ -55,6 +56,10 @@ android { packagingOptions { resources.excludes += "DebugProbesKt.bin" } + + testOptions { + execution = "ANDROIDX_TEST_ORCHESTRATOR" + } } dependencies { @@ -132,4 +137,5 @@ dependencies { androidTestImplementation(libs.androidx.test.core) androidTestImplementation(libs.androidx.test.rules) androidTestImplementation(libs.androidx.test.runner) + androidTestUtil(libs.androidx.test.orchestrator) } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b7bee3d..61e469e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -81,6 +81,8 @@ shareTarget = "1.2.0" kaspresso = "1.4.2" # https://developer.android.com/jetpack/androidx/releases/test androidXTest = "1.5.0" +# https://developer.android.com/jetpack/androidx/releases/test +androidXTestOrchestrator = "1.4.2" [libraries] android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } @@ -140,6 +142,7 @@ androidx-security-crypto = { group = "androidx.security", name = "security-crypt androidx-test-core = { group = "androidx.test", name = "core", version.ref = "androidXTest" } androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidXTest" } androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidXTest" } +androidx-test-orchestrator = { group = "androidx.test", name = "orchestrator", version.ref = "androidXTestOrchestrator" } jakewharton-retrofitSerialization = { group = "com.jakewharton.retrofit", name = "retrofit2-kotlinx-serialization-converter", version.ref = "retrofitKotlinxSerialization" }