Update dependencies (#1540)
This commit is contained in:
parent
935f8dae5e
commit
51956be665
11 changed files with 25 additions and 32 deletions
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
|
||||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
package dev.msfjarvis.aps.injection.password
|
||||
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
@AssistedFactory
|
||||
interface PasswordEntryFactory {
|
||||
fun create(scope: CoroutineScope, bytes: ByteArray): PasswordEntry
|
||||
}
|
|
@ -24,7 +24,7 @@ import com.github.michaelbull.result.onFailure
|
|||
import com.github.michaelbull.result.onSuccess
|
||||
import com.github.michaelbull.result.runCatching
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
||||
import dev.msfjarvis.aps.util.autofill.AutofillResponseBuilder
|
||||
import dev.msfjarvis.aps.util.autofill.DirectoryStructure
|
||||
|
@ -85,7 +85,7 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
|
||||
private val decryptInteractionRequiredAction =
|
||||
registerForActivityResult(StartIntentSenderForResult()) { result ->
|
||||
|
|
|
@ -21,8 +21,8 @@ import com.github.michaelbull.result.onFailure
|
|||
import com.github.michaelbull.result.onSuccess
|
||||
import com.github.michaelbull.result.runCatching
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import dev.msfjarvis.aps.injection.crypto.CryptoSet
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.ui.crypto.DecryptActivityV2
|
||||
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
||||
import dev.msfjarvis.aps.util.autofill.AutofillResponseBuilder
|
||||
|
@ -72,7 +72,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
@Inject lateinit var cryptos: CryptoSet
|
||||
|
||||
private lateinit var directoryStructure: DirectoryStructure
|
||||
|
|
|
@ -19,7 +19,6 @@ import dev.msfjarvis.aps.R
|
|||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import dev.msfjarvis.aps.data.password.FieldItem
|
||||
import dev.msfjarvis.aps.databinding.DecryptLayoutBinding
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.ui.adapters.FieldItemAdapter
|
||||
import dev.msfjarvis.aps.util.extensions.unsafeLazy
|
||||
import dev.msfjarvis.aps.util.extensions.viewBinding
|
||||
|
@ -45,7 +44,7 @@ import org.openintents.openpgp.IOpenPgpService2
|
|||
class DecryptActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound {
|
||||
|
||||
private val binding by viewBinding(DecryptLayoutBinding::inflate)
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
|
||||
private val relativeParentPath by unsafeLazy { getParentPath(fullPath, repoPath) }
|
||||
private var passwordEntry: PasswordEntry? = null
|
||||
|
|
|
@ -16,7 +16,6 @@ import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
|||
import dev.msfjarvis.aps.data.password.FieldItem
|
||||
import dev.msfjarvis.aps.databinding.DecryptLayoutBinding
|
||||
import dev.msfjarvis.aps.injection.crypto.CryptoSet
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.ui.adapters.FieldItemAdapter
|
||||
import dev.msfjarvis.aps.util.extensions.unsafeLazy
|
||||
import dev.msfjarvis.aps.util.extensions.viewBinding
|
||||
|
@ -36,7 +35,7 @@ import kotlinx.coroutines.withContext
|
|||
class DecryptActivityV2 : BasePgpActivity() {
|
||||
|
||||
private val binding by viewBinding(DecryptLayoutBinding::inflate)
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
@Inject lateinit var cryptos: CryptoSet
|
||||
private val relativeParentPath by unsafeLazy { getParentPath(fullPath, repoPath) }
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ import com.google.zxing.integration.android.IntentIntegrator
|
|||
import com.google.zxing.integration.android.IntentIntegrator.QR_CODE
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import dev.msfjarvis.aps.R
|
||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import dev.msfjarvis.aps.data.repo.PasswordRepository
|
||||
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
||||
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
||||
import dev.msfjarvis.aps.ui.dialogs.XkPasswordGeneratorDialogFragment
|
||||
|
@ -65,7 +65,7 @@ import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection
|
|||
class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound {
|
||||
|
||||
private val binding by viewBinding(PasswordCreationActivityBinding::inflate)
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
|
||||
private val suggestedName by unsafeLazy { intent.getStringExtra(EXTRA_FILE_NAME) }
|
||||
private val suggestedPass by unsafeLazy { intent.getStringExtra(EXTRA_PASSWORD) }
|
||||
|
|
|
@ -26,9 +26,9 @@ import com.google.zxing.integration.android.IntentIntegrator
|
|||
import com.google.zxing.integration.android.IntentIntegrator.QR_CODE
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import dev.msfjarvis.aps.R
|
||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
||||
import dev.msfjarvis.aps.injection.crypto.CryptoSet
|
||||
import dev.msfjarvis.aps.injection.password.PasswordEntryFactory
|
||||
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
||||
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
||||
import dev.msfjarvis.aps.ui.dialogs.XkPasswordGeneratorDialogFragment
|
||||
|
@ -58,7 +58,7 @@ import logcat.logcat
|
|||
class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||
|
||||
private val binding by viewBinding(PasswordCreationActivityBinding::inflate)
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntryFactory
|
||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||
@Inject lateinit var cryptos: CryptoSet
|
||||
|
||||
private val suggestedName by unsafeLazy { intent.getStringExtra(EXTRA_FILE_NAME) }
|
||||
|
|
|
@ -35,7 +35,7 @@ gradlePlugin {
|
|||
dependencies {
|
||||
implementation("com.android.tools.build:gradle:7.0.3")
|
||||
implementation("com.diffplug.spotless:spotless-plugin-gradle:5.16.0")
|
||||
implementation("com.google.dagger:hilt-android-gradle-plugin:2.39.1")
|
||||
implementation("com.google.dagger:hilt-android-gradle-plugin:2.40.1")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.9.0")
|
||||
implementation("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
|
||||
implementation("com.vdurmont:semver4j:3.1.0")
|
||||
|
|
|
@ -9,6 +9,10 @@ public final class dev/msfjarvis/aps/data/passfile/PasswordEntry {
|
|||
public final fun hasTotp ()Z
|
||||
}
|
||||
|
||||
public abstract interface class dev/msfjarvis/aps/data/passfile/PasswordEntry$Factory {
|
||||
public abstract fun create (Lkotlinx/coroutines/CoroutineScope;[B)Ldev/msfjarvis/aps/data/passfile/PasswordEntry;
|
||||
}
|
||||
|
||||
public class dev/msfjarvis/aps/util/time/UserClock : java/time/Clock {
|
||||
public fun <init> ()V
|
||||
public fun getZone ()Ljava/time/ZoneId;
|
||||
|
|
|
@ -7,6 +7,7 @@ package dev.msfjarvis.aps.data.passfile
|
|||
|
||||
import com.github.michaelbull.result.mapBoth
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import dev.msfjarvis.aps.util.time.UserClock
|
||||
import dev.msfjarvis.aps.util.totp.Otp
|
||||
|
@ -197,6 +198,11 @@ constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedFactory
|
||||
public interface Factory {
|
||||
public fun create(scope: CoroutineScope, bytes: ByteArray): PasswordEntry
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
|
||||
private const val EXTRA_CONTENT = "Extra Content"
|
||||
|
|
|
@ -6,7 +6,7 @@ compose = "1.1.0-beta02"
|
|||
composeSnapshot = "-"
|
||||
coroutines = "1.5.2"
|
||||
flowbinding = "1.2.0"
|
||||
hilt = "2.39.1"
|
||||
hilt = "2.40.1"
|
||||
kotlin = "1.5.31"
|
||||
lifecycle = "2.4.0"
|
||||
|
||||
|
@ -31,7 +31,7 @@ androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", ve
|
|||
androidx-lifecycle-livedataKtx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref="lifecycle" }
|
||||
androidx-lifecycle-viewmodelKtx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref="lifecycle" }
|
||||
androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha07"
|
||||
androidx-material = "com.google.android.material:material:1.5.0-alpha05"
|
||||
androidx-material = "com.google.android.material:material:1.5.0-beta01"
|
||||
androidx-preference = "androidx.preference:preference:1.2.0-alpha02"
|
||||
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.3.0-alpha01"
|
||||
androidx-recyclerviewSelection = "androidx.recyclerview:recyclerview-selection:1.2.0-alpha01"
|
||||
|
@ -75,7 +75,7 @@ thirdparty-jgit = "org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r"
|
|||
thirdparty-kotlinResult = "com.michael-bull.kotlin-result:kotlin-result:1.1.13"
|
||||
thirdparty-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.7"
|
||||
thirdparty-logcat = "com.squareup.logcat:logcat:0.1"
|
||||
thirdparty-modernAndroidPrefs = "de.maxr1998:modernandroidpreferences:2.2.0"
|
||||
thirdparty-modernAndroidPrefs = "de.maxr1998:modernandroidpreferences:2.2.1"
|
||||
thirdparty-pgpainless = "org.pgpainless:pgpainless-core:1.0.0-rc1"
|
||||
thirdparty-plumber = "com.squareup.leakcanary:plumber-android:2.7"
|
||||
thirdparty-sshj = "com.hierynomus:sshj:0.32.0"
|
||||
|
@ -86,7 +86,7 @@ thirdparty-nonfree-googlePlayAuthApiPhone = "com.google.android.gms:play-service
|
|||
# Testing dependencies
|
||||
testing-junit = "junit:junit:4.13.2"
|
||||
testing-kotlintest-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
|
||||
testing-robolectric = "org.robolectric:robolectric:4.6.1"
|
||||
testing-robolectric = "org.robolectric:robolectric:4.7"
|
||||
testing-sharedPrefsMock = "com.github.android-password-store:shared-preferences-fake:2.0.0"
|
||||
androidx-testing-rules = { module = "androidx.test:rules", version.ref="androidx_test" }
|
||||
androidx-testing-runner = { module = "androidx.test:runner", version.ref="androidx_test" }
|
||||
|
|
Loading…
Reference in a new issue