From f377510afbd5056f32f954f74411ee3b30bae4bf Mon Sep 17 00:00:00 2001 From: SphericalKat Date: Mon, 17 May 2021 14:19:02 +0530 Subject: [PATCH] chore(build): add mock shared preference dependency Signed-off-by: SphericalKat --- app/build.gradle.kts | 1 + buildSrc/src/main/java/BaseProjectConfig.kt | 1 + gradle/libs.versions.toml | 1 + 3 files changed, 3 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 453037239..4b420846b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -106,5 +106,6 @@ dependencies { androidTestImplementation(libs.bundles.testDependencies) androidTestImplementation(libs.bundles.androidTestDependencies) testImplementation(libs.testing.robolectric) + testImplementation(libs.testing.sharedPrefsMock) testImplementation(libs.bundles.testDependencies) } diff --git a/buildSrc/src/main/java/BaseProjectConfig.kt b/buildSrc/src/main/java/BaseProjectConfig.kt index bbfce514e..7666424cc 100644 --- a/buildSrc/src/main/java/BaseProjectConfig.kt +++ b/buildSrc/src/main/java/BaseProjectConfig.kt @@ -45,6 +45,7 @@ internal fun Project.configureForAllProjects() { content { includeModule("com.github.haroldadmin", "WhatTheStack") includeModule("com.github.open-keychain.open-keychain", "sshauthentication-api") + includeModule("com.github.IvanShafran", "shared-preferences-mock") } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d406c3ce9..de01d2926 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -76,6 +76,7 @@ thirdparty-nonfree-googlePlayAuthApiPhone = "com.google.android.gms:play-service testing-junit = "junit:junit:4.13.2" testing-kotlintest-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } testing-robolectric = "org.robolectric:robolectric:4.6-alpha-1" +testing-sharedPrefsMock = "com.github.IvanShafran:shared-preferences-mock:1.0" androidx-testing-rules = { module = "androidx.test:rules", version.ref="androidx_test" } androidx-testing-runner = { module = "androidx.test:runner", version.ref="androidx_test" } kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }