summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSphericalKat <amolele@gmail.com>2021-05-17 14:19:02 +0530
committerSphericalKat <amolele@gmail.com>2021-05-17 14:19:02 +0530
commitf377510afbd5056f32f954f74411ee3b30bae4bf (patch)
tree044f1b0a81f2fd696839762737a7ae0e53821266
parent285bf9d92944c49c36d1828bc388b12a97525b1a (diff)
chore(build): add mock shared preference dependency
Signed-off-by: SphericalKat <amolele@gmail.com>
-rw-r--r--app/build.gradle.kts1
-rw-r--r--buildSrc/src/main/java/BaseProjectConfig.kt1
-rw-r--r--gradle/libs.versions.toml1
3 files changed, 3 insertions, 0 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 45303723..4b420846 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 bbfce514..7666424c 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 d406c3ce..de01d292 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" }