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

143 lines
5.0 KiB
Plaintext
Raw Permalink 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(
"src/main/res/ui/about",
"src/main/res/ui/advanced_settings",
"src/main/res/ui/account",
"src/main/res/ui/balances",
"src/main/res/ui/common",
"src/main/res/ui/export_data",
"src/main/res/ui/home",
"src/main/res/ui/choose_server",
"src/main/res/ui/new_wallet_recovery",
"src/main/res/ui/onboarding",
"src/main/res/ui/receive",
"src/main/res/ui/restore",
"src/main/res/ui/scan",
"src/main/res/ui/seed_recovery",
"src/main/res/ui/send",
"src/main/res/ui/send_confirmation",
"src/main/res/ui/settings",
"src/main/res/ui/support",
"src/main/res/ui/update",
"src/main/res/ui/wallet_address",
"src/main/res/ui/warning",
"src/main/res/ui/security_warning"
)
)
}
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"
)
)
// 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)
2022-02-21 06:33:40 -08:00
implementation(libs.androidx.appcompat)
2021-10-09 07:36:58 -07:00
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.bundles.androidx.camera)
implementation(libs.bundles.androidx.compose.core)
implementation(libs.bundles.androidx.compose.extended)
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)
2022-01-13 09:49:08 -08:00
implementation(libs.zxing)
implementation(projects.buildInfoLib)
implementation(projects.configurationApiLib)
implementation(projects.configurationImplAndroidLib)
implementation(projects.crashAndroidLib)
implementation(projects.preferenceApiLib)
implementation(projects.preferenceImplAndroidLib)
implementation(projects.sdkExtLib)
implementation(projects.spackleAndroidLib)
api(projects.uiDesignLib)
2021-10-09 07:36:58 -07:00
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
}