2022-06-02 04:35:51 -07:00
|
|
|
plugins {
|
2022-10-14 05:17:15 -07:00
|
|
|
id("com.android.test")
|
2022-06-02 04:35:51 -07:00
|
|
|
kotlin("android")
|
2022-06-13 11:06:23 -07:00
|
|
|
id("secant.android-build-conventions")
|
2022-06-02 04:35:51 -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")
|
2022-06-02 04:35:51 -07:00
|
|
|
}
|
|
|
|
|
2022-10-14 05:17:15 -07:00
|
|
|
// Force orchestrator to be used for this module, because we need cleared state before each test
|
2022-06-02 04:35:51 -07:00
|
|
|
val isOrchestratorEnabled = true
|
|
|
|
|
|
|
|
android {
|
2022-09-19 05:24:19 -07:00
|
|
|
namespace = "co.electriccoin.zcash.ui.integration"
|
2022-10-14 05:17:15 -07:00
|
|
|
// Target needs to be set to com.android.application type module
|
|
|
|
targetProjectPath = ":${projects.app.name}"
|
|
|
|
// Run tests in this module
|
|
|
|
experimentalProperties["android.experimental.self-instrumenting"] = true
|
2022-09-19 05:24:19 -07:00
|
|
|
|
2022-06-02 04:35:51 -07:00
|
|
|
defaultConfig {
|
|
|
|
if (isOrchestratorEnabled) {
|
|
|
|
testInstrumentationRunnerArguments["clearPackageData"] = "true"
|
|
|
|
}
|
|
|
|
|
|
|
|
testInstrumentationRunner = "co.electriccoin.zcash.test.ZcashUiTestRunner"
|
|
|
|
}
|
|
|
|
|
2022-10-14 05:17:15 -07:00
|
|
|
// Define the same flavors as in app module
|
|
|
|
flavorDimensions.add("network")
|
|
|
|
productFlavors {
|
|
|
|
create("zcashtestnet") {
|
|
|
|
dimension = "network"
|
|
|
|
}
|
|
|
|
create("zcashmainnet") {
|
|
|
|
dimension = "network"
|
|
|
|
}
|
|
|
|
}
|
2022-10-27 03:51:24 -07:00
|
|
|
buildTypes {
|
|
|
|
create("release") {
|
|
|
|
// to align with the benchmark module requirement - run against minified application
|
|
|
|
}
|
|
|
|
}
|
2022-10-14 05:17:15 -07:00
|
|
|
|
2022-06-02 04:35:51 -07:00
|
|
|
if (isOrchestratorEnabled) {
|
|
|
|
testOptions {
|
|
|
|
execution = "ANDROIDX_TEST_ORCHESTRATOR"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
compose = true
|
|
|
|
}
|
|
|
|
|
|
|
|
composeOptions {
|
|
|
|
kotlinCompilerExtensionVersion = libs.androidx.compose.compiler.get().versionConstraint.displayName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-10-14 05:17:15 -07:00
|
|
|
implementation(projects.uiLib)
|
|
|
|
implementation(projects.uiDesignLib)
|
|
|
|
implementation(projects.testLib)
|
|
|
|
implementation(projects.spackleAndroidLib)
|
|
|
|
|
|
|
|
implementation(libs.bundles.androidx.test)
|
|
|
|
implementation(libs.bundles.androidx.compose.core)
|
2023-01-17 08:43:22 -08:00
|
|
|
implementation(libs.bundles.play.update)
|
2022-10-14 05:17:15 -07:00
|
|
|
|
|
|
|
implementation(libs.androidx.compose.test.junit)
|
|
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
implementation(libs.androidx.uiAutomator)
|
2022-06-02 04:35:51 -07:00
|
|
|
|
2023-01-17 11:54:40 -08:00
|
|
|
androidTestUtil(libs.androidx.test.services) {
|
|
|
|
artifact {
|
|
|
|
type = "apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-02 04:35:51 -07:00
|
|
|
if (isOrchestratorEnabled) {
|
|
|
|
androidTestUtil(libs.androidx.test.orchestrator) {
|
|
|
|
artifact {
|
|
|
|
type = "apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|