apply plugin: "com.android.application"

android {
    compileSdk 34
    defaultConfig {
        applicationId "com.example.android.testing.androidtestorchestratorsample"
        minSdkVersion 21
        targetSdkVersion 34
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        testInstrumentationRunnerArguments clearPackageData: "true"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    productFlavors {
    }

    testOptions {
        execution "ANDROIDX_TEST_ORCHESTRATOR"
        managedDevices {
            devices {
                // run with ../gradlew  nexusOneApi30DebugAndroidTest
                nexusOneApi30(com.android.build.api.dsl.ManagedVirtualDevice) {
                    // A lower resolution device is used here for better emulator performance
                    device = "Nexus One"
                    apiLevel = 30
                    // Also use the AOSP ATD image for better emulator performance
                    systemImageSource = "aosp-atd"
                }
            }
        }
    }
    namespace "com.example.android.testing.androidtestorchestratorsample"
}

dependencies {
    // App's dependencies, including test
    implementation "androidx.annotation:annotation:" + rootProject.androidxAnnotationVersion;
    implementation "com.google.guava:guava:" + rootProject.guavaVersion

    // Testing-only dependencies
    androidTestImplementation "androidx.test:core:" + rootProject.coreVersion;
    androidTestImplementation "androidx.test.ext:junit:" + rootProject.extJUnitVersion;
    androidTestImplementation "androidx.test:runner:" + rootProject.runnerVersion;
    androidTestImplementation "androidx.test:monitor:" + rootProject.monitorVersion;
    androidTestImplementation "androidx.test.espresso:espresso-core:" + rootProject.espressoVersion;
    androidTestImplementation "com.google.truth:truth:" + rootProject.truthVersion;
    androidTestUtil "androidx.test:orchestrator:" + rootProject.orchestratorVersion;

}
