refactor(format-common): migrate to uri-kmp
and convert to JVM library
This commit is contained in:
parent
a6e845f461
commit
3d47ecd698
6 changed files with 5 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.8.0" />
|
||||
<option name="version" value="1.8.10" />
|
||||
</component>
|
||||
</project>
|
|
@ -5,27 +5,20 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
plugins {
|
||||
id("com.github.android-password-store.android-library")
|
||||
id("com.github.android-password-store.kotlin-android")
|
||||
kotlin("jvm")
|
||||
id("com.github.android-password-store.kotlin-library")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.passwordstore.format.common"
|
||||
compileOptions { isCoreLibraryDesugaringEnabled = true }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.kotlin.coroutines.core)
|
||||
api(libs.thirdparty.kotlinResult)
|
||||
coreLibraryDesugaring(libs.android.desugarJdkLibs)
|
||||
implementation(projects.coroutineUtils)
|
||||
implementation(libs.androidx.annotation)
|
||||
implementation(libs.dagger.hilt.core)
|
||||
implementation(libs.thirdparty.commons.codec)
|
||||
implementation(libs.thirdparty.uri)
|
||||
testImplementation(projects.coroutineUtilsTesting)
|
||||
testImplementation(libs.bundles.testDependencies)
|
||||
testImplementation(libs.kotlin.coroutines.test)
|
||||
testImplementation(libs.testing.robolectric)
|
||||
testImplementation(libs.testing.turbine)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package app.passwordstore.util.totp
|
||||
|
||||
import android.net.Uri
|
||||
import com.eygraber.uri.Uri
|
||||
import javax.inject.Inject
|
||||
|
||||
/** [Uri] backed TOTP URL parser. */
|
||||
|
|
|
@ -23,11 +23,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Rule
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class PasswordEntryTest {
|
||||
|
||||
@get:Rule val coroutineTestRule: CoroutineTestRule = CoroutineTestRule()
|
||||
|
|
|
@ -7,12 +7,7 @@ package app.passwordstore.util.totp
|
|||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [23])
|
||||
class UriTotpFinderTest {
|
||||
|
||||
private val totpFinder = UriTotpFinder()
|
||||
|
|
|
@ -92,6 +92,7 @@ thirdparty-pgpainless = "org.pgpainless:pgpainless-core:1.4.4"
|
|||
thirdparty-plumber = { module = "com.squareup.leakcanary:plumber-android-startup", version.ref = "leakcanary" }
|
||||
# TODO: Remove the explicit bcpkix dependency when upgrading this to a BC 1.71 compatible version
|
||||
thirdparty-sshj = "com.hierynomus:sshj:0.35.0"
|
||||
thirdparty-uri = "com.eygraber:uri-kmp:0.0.11"
|
||||
thirdparty-whatthestack = "com.github.haroldadmin:WhatTheStack:1.0.0-alpha04"
|
||||
|
||||
[bundles]
|
||||
|
|
Loading…
Reference in a new issue