mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 06:45:19 +00:00
refactor(format-common): migrate to uri-kmp
and convert to JVM library
This commit is contained in:
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.8.0" />
|
<option name="version" value="1.8.10" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@@ -5,27 +5,20 @@
|
|||||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.github.android-password-store.android-library")
|
kotlin("jvm")
|
||||||
id("com.github.android-password-store.kotlin-android")
|
|
||||||
id("com.github.android-password-store.kotlin-library")
|
id("com.github.android-password-store.kotlin-library")
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
|
||||||
namespace = "app.passwordstore.format.common"
|
|
||||||
compileOptions { isCoreLibraryDesugaringEnabled = true }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(libs.kotlin.coroutines.core)
|
api(libs.kotlin.coroutines.core)
|
||||||
api(libs.thirdparty.kotlinResult)
|
api(libs.thirdparty.kotlinResult)
|
||||||
coreLibraryDesugaring(libs.android.desugarJdkLibs)
|
|
||||||
implementation(projects.coroutineUtils)
|
implementation(projects.coroutineUtils)
|
||||||
implementation(libs.androidx.annotation)
|
implementation(libs.androidx.annotation)
|
||||||
implementation(libs.dagger.hilt.core)
|
implementation(libs.dagger.hilt.core)
|
||||||
implementation(libs.thirdparty.commons.codec)
|
implementation(libs.thirdparty.commons.codec)
|
||||||
|
implementation(libs.thirdparty.uri)
|
||||||
testImplementation(projects.coroutineUtilsTesting)
|
testImplementation(projects.coroutineUtilsTesting)
|
||||||
testImplementation(libs.bundles.testDependencies)
|
testImplementation(libs.bundles.testDependencies)
|
||||||
testImplementation(libs.kotlin.coroutines.test)
|
testImplementation(libs.kotlin.coroutines.test)
|
||||||
testImplementation(libs.testing.robolectric)
|
|
||||||
testImplementation(libs.testing.turbine)
|
testImplementation(libs.testing.turbine)
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
package app.passwordstore.util.totp
|
package app.passwordstore.util.totp
|
||||||
|
|
||||||
import android.net.Uri
|
import com.eygraber.uri.Uri
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
/** [Uri] backed TOTP URL parser. */
|
/** [Uri] backed TOTP URL parser. */
|
||||||
|
@@ -23,11 +23,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.runner.RunWith
|
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)
|
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)
|
||||||
@RunWith(RobolectricTestRunner::class)
|
|
||||||
class PasswordEntryTest {
|
class PasswordEntryTest {
|
||||||
|
|
||||||
@get:Rule val coroutineTestRule: CoroutineTestRule = CoroutineTestRule()
|
@get:Rule val coroutineTestRule: CoroutineTestRule = CoroutineTestRule()
|
||||||
|
@@ -7,12 +7,7 @@ package app.passwordstore.util.totp
|
|||||||
|
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
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 {
|
class UriTotpFinderTest {
|
||||||
|
|
||||||
private val totpFinder = UriTotpFinder()
|
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" }
|
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
|
# 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-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"
|
thirdparty-whatthestack = "com.github.haroldadmin:WhatTheStack:1.0.0-alpha04"
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
|
Reference in New Issue
Block a user