2023-10-17 07:01:53 -07:00
|
|
|
import com.android.build.api.variant.BuildConfigField
|
|
|
|
|
2021-10-09 07:36:58 -07:00
|
|
|
plugins {
|
|
|
|
id("com.android.library")
|
|
|
|
kotlin("android")
|
2024-02-27 01:13:44 -08:00
|
|
|
kotlin("plugin.serialization")
|
2022-06-13 11:06:23 -07:00
|
|
|
id("secant.android-build-conventions")
|
2022-05-17 07:06:56 -07:00
|
|
|
id("wtf.emulator.gradle")
|
2022-06-13 11:06:23 -07:00
|
|
|
id("secant.emulator-wtf-conventions")
|
2023-02-13 05:10:32 -08:00
|
|
|
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"
|
|
|
|
|
2022-05-02 12:49:49 -07:00
|
|
|
defaultConfig {
|
|
|
|
testInstrumentationRunner = "co.electriccoin.zcash.test.ZcashUiTestRunner"
|
|
|
|
}
|
|
|
|
|
2021-10-09 07:36:58 -07:00
|
|
|
buildFeatures {
|
|
|
|
compose = true
|
2023-06-09 06:19:09 -07:00
|
|
|
buildConfig = true
|
2021-10-09 07:36:58 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
composeOptions {
|
2021-10-18 11:27:16 -07:00
|
|
|
kotlinCompilerExtensionVersion = libs.androidx.compose.compiler.get().versionConstraint.displayName
|
2021-10-09 07:36:58 -07:00
|
|
|
}
|
|
|
|
|
2021-10-31 10:36:51 -07:00
|
|
|
sourceSets {
|
|
|
|
getByName("main").apply {
|
|
|
|
res.setSrcDirs(
|
|
|
|
setOf(
|
2022-04-25 05:35:30 -07:00
|
|
|
"src/main/res/ui/about",
|
2023-12-06 06:29:12 -08:00
|
|
|
"src/main/res/ui/account",
|
2024-10-03 08:40:19 -07:00
|
|
|
"src/main/res/ui/address_book",
|
|
|
|
"src/main/res/ui/add_contact",
|
2024-07-18 01:48:02 -07:00
|
|
|
"src/main/res/ui/advanced_settings",
|
2024-05-22 06:59:38 -07:00
|
|
|
"src/main/res/ui/authentication",
|
2023-12-18 05:31:25 -08:00
|
|
|
"src/main/res/ui/balances",
|
2021-10-31 10:36:51 -07:00
|
|
|
"src/main/res/ui/common",
|
2024-10-25 09:37:15 -07:00
|
|
|
"src/main/res/ui/contact",
|
2024-05-02 01:07:28 -07:00
|
|
|
"src/main/res/ui/delete_wallet",
|
2023-11-13 05:53:16 -08:00
|
|
|
"src/main/res/ui/export_data",
|
2021-12-29 11:38:14 -08:00
|
|
|
"src/main/res/ui/home",
|
2024-03-04 07:53:30 -08:00
|
|
|
"src/main/res/ui/choose_server",
|
2024-10-17 04:07:50 -07:00
|
|
|
"src/main/res/ui/integrations",
|
2023-12-18 05:31:25 -08:00
|
|
|
"src/main/res/ui/new_wallet_recovery",
|
2021-11-17 12:19:49 -08:00
|
|
|
"src/main/res/ui/onboarding",
|
2024-10-21 12:11:10 -07:00
|
|
|
"src/main/res/ui/payment_request",
|
2024-10-08 00:46:42 -07:00
|
|
|
"src/main/res/ui/qr_code",
|
2024-10-17 03:13:19 -07:00
|
|
|
"src/main/res/ui/request",
|
2023-02-28 05:54:07 -08:00
|
|
|
"src/main/res/ui/receive",
|
2023-03-03 05:06:03 -08:00
|
|
|
"src/main/res/ui/restore",
|
2024-07-19 01:17:45 -07:00
|
|
|
"src/main/res/ui/restore_success",
|
2023-03-03 05:06:03 -08:00
|
|
|
"src/main/res/ui/scan",
|
2024-07-18 01:48:02 -07:00
|
|
|
"src/main/res/ui/security_warning",
|
2023-11-23 01:41:59 -08:00
|
|
|
"src/main/res/ui/seed_recovery",
|
2022-03-01 05:11:23 -08:00
|
|
|
"src/main/res/ui/send",
|
2024-03-21 01:57:36 -07:00
|
|
|
"src/main/res/ui/send_confirmation",
|
2022-01-26 13:33:02 -08:00
|
|
|
"src/main/res/ui/settings",
|
2022-04-19 18:28:49 -07:00
|
|
|
"src/main/res/ui/support",
|
2022-05-16 04:40:50 -07:00
|
|
|
"src/main/res/ui/update",
|
2024-10-25 09:37:15 -07:00
|
|
|
"src/main/res/ui/update_contact",
|
2022-10-03 06:59:09 -07:00
|
|
|
"src/main/res/ui/wallet_address",
|
|
|
|
"src/main/res/ui/warning",
|
2024-07-18 01:48:02 -07:00
|
|
|
"src/main/res/ui/whats_new",
|
2024-08-22 22:58:27 -07:00
|
|
|
"src/main/res/ui/exchange_rate",
|
2021-10-31 10:36:51 -07:00
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
2021-10-09 07:36:58 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-17 07:01:53 -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(),
|
2023-10-19 06:00:47 -07:00
|
|
|
comment = "Whether is the SecureScreen sensitive data protection enabled"
|
2023-10-17 07:01:53 -07:00
|
|
|
)
|
|
|
|
)
|
2024-11-04 03:53:43 -08:00
|
|
|
variant.buildConfigFields.put(
|
|
|
|
"ZCASH_FLEXA_KEY",
|
|
|
|
BuildConfigField(
|
|
|
|
type = "String",
|
|
|
|
value = "\"${project.property("ZCASH_FLEXA_KEY")?.toString().orEmpty()}\"",
|
|
|
|
comment = "Publishable key of the Flexa integration"
|
|
|
|
)
|
|
|
|
)
|
2024-09-12 09:10:54 -07:00
|
|
|
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"
|
|
|
|
)
|
|
|
|
)
|
2023-11-08 01:47:31 -08:00
|
|
|
// 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"
|
|
|
|
)
|
|
|
|
)
|
2023-10-17 07:01:53 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-09 07:36:58 -07:00
|
|
|
dependencies {
|
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)
|
2022-05-19 05:41:58 -07:00
|
|
|
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)
|
2022-02-04 04:37:08 -08:00
|
|
|
implementation(libs.androidx.workmanager)
|
2024-09-12 09:10:54 -07:00
|
|
|
implementation(libs.androidx.browser)
|
2022-05-19 05:41:58 -07:00
|
|
|
implementation(libs.bundles.androidx.camera)
|
2022-02-21 06:50:09 -08:00
|
|
|
implementation(libs.bundles.androidx.compose.core)
|
|
|
|
implementation(libs.bundles.androidx.compose.extended)
|
2024-09-04 06:36:59 -07:00
|
|
|
api(libs.bundles.koin)
|
2023-01-17 08:43:22 -08:00
|
|
|
implementation(libs.bundles.play.update)
|
2021-11-12 04:09:30 -08:00
|
|
|
implementation(libs.kotlin.stdlib)
|
2021-10-09 07:36:58 -07:00
|
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
2022-05-19 05:41:58 -07:00
|
|
|
implementation(libs.kotlinx.coroutines.guava)
|
2022-04-19 18:28:49 -07:00
|
|
|
implementation(libs.kotlinx.datetime)
|
2023-03-01 04:58:47 -08:00
|
|
|
implementation(libs.kotlinx.immutable)
|
2024-02-27 01:13:44 -08:00
|
|
|
implementation(libs.kotlinx.serializable.json)
|
2021-11-12 04:09:30 -08:00
|
|
|
implementation(libs.zcash.sdk)
|
2023-02-17 03:05:23 -08:00
|
|
|
implementation(libs.zcash.sdk.incubator)
|
2021-11-12 04:09:30 -08:00
|
|
|
implementation(libs.zcash.bip39)
|
2022-01-13 09:49:08 -08:00
|
|
|
implementation(libs.zxing)
|
2021-11-12 04:09:30 -08:00
|
|
|
|
2024-11-04 03:53:43 -08:00
|
|
|
api(libs.flexa.core)
|
|
|
|
api(libs.flexa.spend)
|
|
|
|
|
2022-04-19 18:28:49 -07:00
|
|
|
implementation(projects.buildInfoLib)
|
2023-02-20 08:07:26 -08:00
|
|
|
implementation(projects.configurationApiLib)
|
2022-05-31 09:38:02 -07:00
|
|
|
implementation(projects.crashAndroidLib)
|
2021-11-12 04:09:30 -08:00
|
|
|
implementation(projects.preferenceApiLib)
|
|
|
|
implementation(projects.preferenceImplAndroidLib)
|
2022-05-31 09:38:02 -07:00
|
|
|
implementation(projects.spackleAndroidLib)
|
2024-09-04 06:36:59 -07:00
|
|
|
api(projects.configurationImplAndroidLib)
|
|
|
|
api(projects.sdkExtLib)
|
2022-06-08 07:22:09 -07:00
|
|
|
api(projects.uiDesignLib)
|
2024-10-16 02:12:03 -07:00
|
|
|
api(libs.androidx.fragment)
|
|
|
|
api(libs.androidx.fragment.compose)
|
|
|
|
api(libs.androidx.activity)
|
2024-10-18 00:43:25 -07:00
|
|
|
// api(libs.google.http.client.gson) {
|
|
|
|
// exclude(group = "io.grpc")
|
|
|
|
// }
|
|
|
|
// api(libs.google.api.client.android) {
|
|
|
|
// exclude(group = "org.apache.httpcomponents")
|
|
|
|
// exclude(group = "io.grpc")
|
|
|
|
// }
|
|
|
|
// api(libs.google.api.services.drive) {
|
|
|
|
// exclude(group = "org.apache.httpcomponents")
|
|
|
|
// exclude(group = "io.grpc")
|
|
|
|
// }
|
|
|
|
// api(libs.play.services.auth) {
|
|
|
|
// exclude(group = "io.grpc")
|
|
|
|
// }
|
2024-10-16 02:12:03 -07:00
|
|
|
api(libs.bundles.androidx.biometric)
|
2021-10-09 07:36:58 -07:00
|
|
|
|
2022-05-02 12:49:49 -07:00
|
|
|
androidTestImplementation(projects.testLib)
|
2021-10-09 07:36:58 -07:00
|
|
|
androidTestImplementation(libs.bundles.androidx.test)
|
2021-10-09 07:37:03 -07:00
|
|
|
androidTestImplementation(libs.androidx.compose.test.junit)
|
|
|
|
androidTestImplementation(libs.androidx.compose.test.manifest)
|
2021-11-12 04:09:30 -08:00
|
|
|
androidTestImplementation(libs.kotlin.reflect)
|
2022-02-17 05:08:06 -08:00
|
|
|
androidTestImplementation(libs.kotlin.test)
|
2021-10-11 12:52:24 -07:00
|
|
|
|
2023-01-17 11:54:40 -08: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()) {
|
2023-02-13 05:10:32 -08:00
|
|
|
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
|
|
|
}
|