diff options
-rw-r--r-- | app/build.gradle.kts | 2 | ||||
-rw-r--r-- | detekt-baselines/format-common-impl.xml | 8 | ||||
-rw-r--r-- | detekt-baselines/format-common.xml | 9 | ||||
-rw-r--r-- | format-common-impl/build.gradle.kts | 23 | ||||
-rw-r--r-- | format-common/build.gradle.kts | 18 | ||||
-rw-r--r-- | format-common/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt (renamed from format-common-impl/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt) | 0 | ||||
-rw-r--r-- | format-common/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt (renamed from format-common-impl/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt) | 2 | ||||
-rw-r--r-- | format-common/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt (renamed from format-common-impl/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt) | 0 | ||||
-rw-r--r-- | format-common/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt (renamed from format-common-impl/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt) | 0 | ||||
-rw-r--r-- | format-common/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt (renamed from format-common-impl/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt) | 0 | ||||
-rw-r--r-- | settings.gradle.kts | 2 |
11 files changed, 23 insertions, 41 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 62e1f857..c4d1cff5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -58,7 +58,7 @@ dependencies { implementation(projects.autofillParser) implementation(projects.coroutineUtils) implementation(projects.cryptoPgpainless) - implementation(projects.formatCommonImpl) + implementation(projects.formatCommon) implementation(projects.passgen.diceware) implementation(projects.passgen.random) implementation(projects.uiCompose) diff --git a/detekt-baselines/format-common-impl.xml b/detekt-baselines/format-common-impl.xml deleted file mode 100644 index 1d731d42..00000000 --- a/detekt-baselines/format-common-impl.xml +++ /dev/null @@ -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> diff --git a/detekt-baselines/format-common.xml b/detekt-baselines/format-common.xml index c373eea4..1d731d42 100644 --- a/detekt-baselines/format-common.xml +++ b/detekt-baselines/format-common.xml @@ -1,5 +1,8 @@ -<?xml version='1.0' encoding='UTF-8'?> +<?xml version="1.0" ?> <SmellBaseline> - <ManuallySuppressedIssues/> - <CurrentIssues/> + <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> diff --git a/format-common-impl/build.gradle.kts b/format-common-impl/build.gradle.kts deleted file mode 100644 index f9bd7628..00000000 --- a/format-common-impl/build.gradle.kts +++ /dev/null @@ -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) -} diff --git a/format-common/build.gradle.kts b/format-common/build.gradle.kts index a42a2404..34b5c69e 100644 --- a/format-common/build.gradle.kts +++ b/format-common/build.gradle.kts @@ -5,15 +5,27 @@ @file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage") 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") } +android { + namespace = "app.passwordstore.format.common" + compileOptions { isCoreLibraryDesugaringEnabled = true } +} + dependencies { + api(libs.kotlin.coroutines.core) api(libs.thirdparty.kotlinResult) + compileOnly(libs.androidx.annotation) + coreLibraryDesugaring(libs.android.desugarJdkLibs) implementation(projects.coroutineUtils) - implementation(libs.androidx.annotation) implementation(libs.dagger.hilt.core) 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) } diff --git a/format-common-impl/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt b/format-common/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt index 741a21a7..741a21a7 100644 --- a/format-common-impl/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt +++ b/format-common/src/main/kotlin/app/passwordstore/util/totp/UriTotpFinder.kt diff --git a/format-common-impl/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt b/format-common/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt index 0d77cfe2..31ced9f3 100644 --- a/format-common-impl/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt +++ b/format-common/src/test/kotlin/app/passwordstore/data/passfile/PasswordEntryTest.kt @@ -153,7 +153,7 @@ class PasswordEntryTest { /** * 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 - * blocked https://msfjarvis.dev/aps/issue/1550. + * blocked https://github.com/Android-Password-Store/Android-Password-Store/issues/1550. */ @Test fun generatedOtpHasCorrectRemainingTime() = runTest { diff --git a/format-common-impl/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt b/format-common/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt index 8a860a39..8a860a39 100644 --- a/format-common-impl/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt +++ b/format-common/src/test/kotlin/app/passwordstore/util/time/TestUserClock.kt diff --git a/format-common-impl/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt b/format-common/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt index 54ac492d..54ac492d 100644 --- a/format-common-impl/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt +++ b/format-common/src/test/kotlin/app/passwordstore/util/totp/OtpTest.kt diff --git a/format-common-impl/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt b/format-common/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt index c62df0e7..c62df0e7 100644 --- a/format-common-impl/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt +++ b/format-common/src/test/kotlin/app/passwordstore/util/totp/UriTotpFinderTest.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index e051f053..f0df8965 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -179,8 +179,6 @@ include("crypto-pgpainless") include("format-common") -include("format-common-impl") - include("passgen:diceware") include("passgen:random") |