apply plugin: 'com.android.library'
apply plugin: 'devicefarm'

android {
    compileSdkVersion 29

    defaultConfig {
        minSdkVersion 14 // junit ext
        targetSdkVersion 29
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
}

dependencies {
    api (project(':aws-android-sdk-cognitoidentityprovider')) {
        exclude group: 'com.google.android', module: 'android'
    }

    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
    androidTestImplementation 'org.mockito:mockito-core:3.2.4'
    androidTestImplementation project(':aws-android-sdk-testutils')
}

devicefarm {
    // Required. The Project must already exist. You can create a project in the AWS console.
    projectName 'AWSAndroidKeyStoreTester'

    // Required. You must specify either accessKey and secretKey OR roleArn. roleArn takes precedence.
    authentication {
        accessKey "$System.env.DEVICEFARM_ACCESS_KEY"
        secretKey "$System.env.DEVICEFARM_SECRET_KEY"
    }

    devicePool 'AWSAndroidKeyStoreTesterPool'
}

