secant-android-wallet/ui-lib/build.gradle.kts

191 lines
7.0 KiB
Plaintext
Raw Normal View History

import com.android.build.api.variant.BuildConfigField
2021-10-09 07:36:58 -07:00
plugins {
id("com.android.library")
kotlin("android")
kotlin("plugin.serialization")
id("secant.android-build-conventions")
id("wtf.emulator.gradle")
id("secant.emulator-wtf-conventions")
id("secant.jacoco-conventions")
2021-10-09 07:36:58 -07:00
}
android {
2022-09-19 05:24:19 -07:00
namespace = "co.electriccoin.zcash.ui"
defaultConfig {
testInstrumentationRunner = "co.electriccoin.zcash.test.ZcashUiTestRunner"
}
2021-10-09 07:36:58 -07:00
buildFeatures {
compose = true
buildConfig = true
2021-10-09 07:36:58 -07:00
}
composeOptions {
kotlinCompilerExtensionVersion = libs.androidx.compose.compiler.get().versionConstraint.displayName
2021-10-09 07:36:58 -07:00
}
sourceSets {
getByName("main").apply {
res.setSrcDirs(
setOf(
// This is a special case as these texts are not translated, they are replaced in build time via
// app/build.gradle.kts instead
"src/main/res/ui/non_translatable",
"src/main/res/ui/about",
"src/main/res/ui/account",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/account_list",
"src/main/res/ui/address_book",
"src/main/res/ui/add_contact",
"src/main/res/ui/advanced_settings",
"src/main/res/ui/authentication",
"src/main/res/ui/balances",
"src/main/res/ui/common",
"src/main/res/ui/contact",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/connect_keystone",
"src/main/res/ui/delete_wallet",
"src/main/res/ui/export_data",
"src/main/res/ui/home",
"src/main/res/ui/choose_server",
"src/main/res/ui/integrations",
"src/main/res/ui/onboarding",
"src/main/res/ui/payment_request",
"src/main/res/ui/qr_code",
"src/main/res/ui/request",
"src/main/res/ui/receive",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/review_keystone_transaction",
"src/main/res/ui/restore",
"src/main/res/ui/restore_success",
"src/main/res/ui/scan",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/scan_keystone",
"src/main/res/ui/security_warning",
"src/main/res/ui/seed_recovery",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/select_keystone_account",
"src/main/res/ui/send",
"src/main/res/ui/send_confirmation",
"src/main/res/ui/settings",
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
"src/main/res/ui/sign_keystone_transaction",
"src/main/res/ui/feedback",
"src/main/res/ui/update",
"src/main/res/ui/update_contact",
"src/main/res/ui/wallet_address",
"src/main/res/ui/warning",
"src/main/res/ui/whats_new",
"src/main/res/ui/exchange_rate",
)
)
}
2021-10-09 07:36:58 -07:00
}
}
androidComponents {
onVariants { variant ->
// Configure SecureScreen for protecting screens with sensitive data in runtime
variant.buildConfigFields.put(
"IS_SECURE_SCREEN_ENABLED",
BuildConfigField(
type = "boolean",
value = project.property("IS_SECURE_SCREEN_PROTECTION_ACTIVE").toString(),
comment = "Whether is the SecureScreen sensitive data protection enabled"
)
)
variant.buildConfigFields.put(
"ZCASH_FLEXA_KEY",
BuildConfigField(
type = "String",
value = "\"${project.property("ZCASH_FLEXA_KEY")?.toString().orEmpty()}\"",
comment = "Publishable key of the Flexa integration"
)
)
variant.buildConfigFields.put(
"ZCASH_COINBASE_APP_ID",
BuildConfigField(
type = "String",
value = "\"${project.property("ZCASH_COINBASE_APP_ID")?.toString().orEmpty()}\"",
comment = "App ID of the Coinbase Onramp integration"
)
)
// To configure screen orientation in runtime
variant.buildConfigFields.put(
"IS_SCREEN_ROTATION_ENABLED",
BuildConfigField(
type = "boolean",
value = project.property("IS_SCREEN_ROTATION_ENABLED").toString(),
comment = "Whether is the screen rotation enabled, otherwise, it's locked in the portrait mode"
)
)
}
}
2021-10-09 07:36:58 -07:00
dependencies {
[#313] scan qr screen functional * [#312] [#309] Scaffold Scan QR Screen - Screen scaffolding. - Model classes. - Screen states handling. - Needed dependencies added. - Camera permission handling. Redirect to Settings. - Added SettingsUtilTest class. - Added view classes tests. - Renamed tag class in update package. - Fix the scan frame size while changing the screen orientation. - Use local variable for cameraProvider. - Use UUID for source of randomness. - Eliminate blocking call for camera. - Fix preview name. - Remove Google Guava dependency. - Suppress Lint warning. - Improved calculation of the camera frame size. Moved it into Constraint layout. - Added custom image analyser class. - Implemented logic for the QR scan screen while QR code is found. - Manual tests added. - New module with integration tests for QR Scan screen. Added 3 integration and 4 view tests. - Simplify QR Scan screen view basic tests. - Switched from pure compose permission handling to Accompanist way of handling CAMERA permission. - Added validation of Zcash wallet address from QR scanning result. - Fix the integration tests for the CI WTF emulator runs. - Add comment on RTL test result. - Improve waitForDeviceIdle() method. Use it on the other test too. - Change the integration test module main manifest package name. - Debounce scans. - Improve thread safety of scan collection. - Added instructions on how to set up an emulator in manual tests. - Replace compose collectAsState() with coroutine launch(). - Add sample() to get rid of several callback events at the same time. - Stop updating the scanState when it's already in Scanning state. - Fix condition on navigation. - Remove validateJob check. - Speed up the integration test - Wrap ImageAnalysis.qrCodeFlow to remember. - Auto-close the camera image when we're done with it in all cases. - Update minimal SDK version to 24 for WTF emulators. - Update Architecture documentation. - Removed extra blank space in ui-design module definition. - Add ui-integration-test-lib. - Update Mermaid diagram with newly added module. - Move UI modules into one wrap in the diagram. - Move sdk-ext-lib and sdk-ext-ui under the same modules section. - Update camera dependencies. Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-06-02 04:35:51 -07:00
implementation(libs.accompanist.permissions)
2021-10-09 07:36:58 -07:00
implementation(libs.androidx.activity)
implementation(libs.androidx.annotation)
implementation(libs.androidx.constraintlayout)
2021-10-09 07:36:58 -07:00
implementation(libs.androidx.core)
implementation(libs.androidx.lifecycle.livedata)
2021-12-03 05:19:15 -08:00
implementation(libs.androidx.splash)
implementation(libs.androidx.workmanager)
implementation(libs.androidx.browser)
implementation(libs.bundles.androidx.camera)
implementation(libs.bundles.androidx.compose.core)
implementation(libs.bundles.androidx.compose.extended)
api(libs.bundles.koin)
implementation(libs.bundles.play.update)
implementation(libs.kotlin.stdlib)
2021-10-09 07:36:58 -07:00
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.guava)
implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.immutable)
implementation(libs.kotlinx.serializable.json)
implementation(libs.zcash.sdk)
2023-02-17 03:05:23 -08:00
implementation(libs.zcash.sdk.incubator)
implementation(libs.zcash.bip39)
implementation(libs.tink)
2022-01-13 09:49:08 -08:00
implementation(libs.zxing)
api(libs.flexa.core)
api(libs.flexa.spend)
implementation(projects.buildInfoLib)
implementation(projects.configurationApiLib)
implementation(projects.crashAndroidLib)
implementation(projects.preferenceApiLib)
implementation(projects.preferenceImplAndroidLib)
implementation(projects.spackleAndroidLib)
api(projects.configurationImplAndroidLib)
api(projects.sdkExtLib)
api(projects.uiDesignLib)
api(libs.androidx.fragment)
api(libs.androidx.fragment.compose)
api(libs.androidx.activity)
api(libs.bundles.androidx.biometric)
2021-10-09 07:36:58 -07:00
Feature: Keystone integration (#1692) (#1707) * Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com> --------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2024-12-17 09:40:36 -08:00
api(libs.keystone)
api(libs.hummingbird)
androidTestImplementation(projects.testLib)
2021-10-09 07:36:58 -07:00
androidTestImplementation(libs.bundles.androidx.test)
androidTestImplementation(libs.androidx.compose.test.junit)
androidTestImplementation(libs.androidx.compose.test.manifest)
androidTestImplementation(libs.kotlin.reflect)
2022-02-17 05:08:06 -08:00
androidTestImplementation(libs.kotlin.test)
2021-10-11 12:52:24 -07:00
androidTestUtil(libs.androidx.test.services) {
artifact {
type = "apk"
}
}
2021-10-11 12:52:24 -07:00
if (project.property("IS_USE_TEST_ORCHESTRATOR").toString().toBoolean()) {
androidTestUtil(libs.androidx.test.services)
2021-10-11 12:52:24 -07:00
androidTestUtil(libs.androidx.test.orchestrator) {
artifact {
type = "apk"
}
}
}
2021-10-09 07:36:58 -07:00
}