From 41c86b67f3f1fe320e702b05887f22188a5b42fc Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 28 Sep 2023 01:29:24 +0530 Subject: refactor: use `runSuspendCatching` from `kotlin-result` --- crypto/pgpainless/build.gradle.kts | 2 +- .../src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto') diff --git a/crypto/pgpainless/build.gradle.kts b/crypto/pgpainless/build.gradle.kts index 29f5bb1f..bfaff4f7 100644 --- a/crypto/pgpainless/build.gradle.kts +++ b/crypto/pgpainless/build.gradle.kts @@ -6,11 +6,11 @@ plugins { id("com.github.android-password-store.kotlin-jvm-library") } dependencies { api(projects.crypto.common) - implementation(projects.coroutineUtils) implementation(libs.androidx.annotation) implementation(libs.dagger.hilt.core) implementation(libs.kotlinx.coroutines.core) implementation(libs.thirdparty.kotlinResult) + implementation(libs.thirdparty.kotlinResult.coroutines) implementation(libs.thirdparty.pgpainless) testImplementation(libs.bundles.testDependencies) testImplementation(libs.kotlinx.coroutines.test) diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt index aed1acf2..8aa11803 100644 --- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt +++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt @@ -17,8 +17,8 @@ import app.passwordstore.crypto.errors.KeyDirectoryUnavailableException import app.passwordstore.crypto.errors.KeyNotFoundException import app.passwordstore.crypto.errors.NoKeysAvailableException import app.passwordstore.crypto.errors.UnusableKeyException -import app.passwordstore.util.coroutines.runSuspendCatching import com.github.michaelbull.result.Result +import com.github.michaelbull.result.coroutines.runSuspendCatching import com.github.michaelbull.result.unwrap import java.io.File import javax.inject.Inject -- cgit v1.2.3