refactor: merge format-common-impl into format-common
Also converts the format-common module into an Android library since UriTotpFinder requires the Android SDK.
This commit is contained in:
parent
39a0284cd5
commit
8cfe6ec84c
11 changed files with 23 additions and 41 deletions
|
@ -58,7 +58,7 @@ dependencies {
|
||||||
implementation(projects.autofillParser)
|
implementation(projects.autofillParser)
|
||||||
implementation(projects.coroutineUtils)
|
implementation(projects.coroutineUtils)
|
||||||
implementation(projects.cryptoPgpainless)
|
implementation(projects.cryptoPgpainless)
|
||||||
implementation(projects.formatCommonImpl)
|
implementation(projects.formatCommon)
|
||||||
implementation(projects.passgen.diceware)
|
implementation(projects.passgen.diceware)
|
||||||
implementation(projects.passgen.random)
|
implementation(projects.passgen.random)
|
||||||
implementation(projects.uiCompose)
|
implementation(projects.uiCompose)
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" ?>
|
|
||||||
<SmellBaseline>
|
|
||||||
<ManuallySuppressedIssues></ManuallySuppressedIssues>
|
|
||||||
<CurrentIssues>
|
|
||||||
<ID>MaxLineLength:UriTotpFinderTest.kt$UriTotpFinderTest.Companion$"otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25"</ID>
|
|
||||||
<ID>ReturnCount:UriTotpFinder.kt$UriTotpFinder$override fun findSecret(content: String): String?</ID>
|
|
||||||
</CurrentIssues>
|
|
||||||
</SmellBaseline>
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version="1.0" ?>
|
||||||
<SmellBaseline>
|
<SmellBaseline>
|
||||||
<ManuallySuppressedIssues/>
|
<ManuallySuppressedIssues></ManuallySuppressedIssues>
|
||||||
<CurrentIssues/>
|
<CurrentIssues>
|
||||||
|
<ID>MaxLineLength:UriTotpFinderTest.kt$UriTotpFinderTest.Companion$"otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25"</ID>
|
||||||
|
<ID>ReturnCount:UriTotpFinder.kt$UriTotpFinder$override fun findSecret(content: String): String?</ID>
|
||||||
|
</CurrentIssues>
|
||||||
</SmellBaseline>
|
</SmellBaseline>
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
*/
|
|
||||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("com.github.android-password-store.android-library")
|
|
||||||
id("com.github.android-password-store.kotlin-android")
|
|
||||||
id("com.github.android-password-store.kotlin-library")
|
|
||||||
}
|
|
||||||
|
|
||||||
android { namespace = "app.passwordstore.format.common.impl" }
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api(projects.formatCommon)
|
|
||||||
implementation(libs.dagger.hilt.core)
|
|
||||||
testImplementation(projects.coroutineUtilsTesting)
|
|
||||||
testImplementation(libs.bundles.testDependencies)
|
|
||||||
testImplementation(libs.kotlin.coroutines.test)
|
|
||||||
testImplementation(libs.testing.robolectric)
|
|
||||||
testImplementation(libs.testing.turbine)
|
|
||||||
}
|
|
|
@ -5,15 +5,27 @@
|
||||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
id("com.github.android-password-store.android-library")
|
||||||
|
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.thirdparty.kotlinResult)
|
api(libs.thirdparty.kotlinResult)
|
||||||
|
compileOnly(libs.androidx.annotation)
|
||||||
|
coreLibraryDesugaring(libs.android.desugarJdkLibs)
|
||||||
implementation(projects.coroutineUtils)
|
implementation(projects.coroutineUtils)
|
||||||
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.kotlin.coroutines.core)
|
testImplementation(projects.coroutineUtilsTesting)
|
||||||
|
testImplementation(libs.bundles.testDependencies)
|
||||||
|
testImplementation(libs.kotlin.coroutines.test)
|
||||||
|
testImplementation(libs.testing.robolectric)
|
||||||
|
testImplementation(libs.testing.turbine)
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ class PasswordEntryTest {
|
||||||
/**
|
/**
|
||||||
* Same as [generatesOtpFromTotpUri], but advances the clock by 5 seconds. This exercises the
|
* Same as [generatesOtpFromTotpUri], but advances the clock by 5 seconds. This exercises the
|
||||||
* [Totp.remainingTime] calculation logic, and acts as a regression test to resolve the bug which
|
* [Totp.remainingTime] calculation logic, and acts as a regression test to resolve the bug which
|
||||||
* blocked https://msfjarvis.dev/aps/issue/1550.
|
* blocked https://github.com/Android-Password-Store/Android-Password-Store/issues/1550.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
fun generatedOtpHasCorrectRemainingTime() = runTest {
|
fun generatedOtpHasCorrectRemainingTime() = runTest {
|
|
@ -179,8 +179,6 @@ include("crypto-pgpainless")
|
||||||
|
|
||||||
include("format-common")
|
include("format-common")
|
||||||
|
|
||||||
include("format-common-impl")
|
|
||||||
|
|
||||||
include("passgen:diceware")
|
include("passgen:diceware")
|
||||||
|
|
||||||
include("passgen:random")
|
include("passgen:random")
|
||||||
|
|
Loading…
Reference in a new issue