plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
    kotlinOptions {
        jvmTarget = "17"
    }
}

android {
    namespace 'androidx.test.gradletests.espresso.idling_resource'
    compileSdk rootProject.ext.compileSdk

    defaultConfig {
        minSdk rootProject.ext.minSdk
        targetSdk rootProject.ext.targetSdk

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {

    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    testOptions {
        animationsDisabled = true
        managedDevices {
            devices {
                // run with ../gradlew  nexusOneDebugAndroidTest
                nexusOne(com.android.build.api.dsl.ManagedVirtualDevice) {
                    // A lower resolution device is used here for better emulator performance
                    device = "Nexus One"
                    apiLevel = rootProject.ext.emulatorApi
                    // Also use the AOSP Automated Test Device image for better emulator performance
                    systemImageSource = "aosp-atd"
                }
            }
        }
    }
}

dependencies {
    implementation "androidx.annotation:annotation:1.7.0-beta01"
    implementation libs.espresso.idlingresource
    androidTestImplementation libs.espresso.core
    androidTestImplementation libs.espresso.intents
    androidTestImplementation libs.ext.junit
}
