apply plugin: 'com.android.library'
apply plugin: 'com.amazonaws.appsync'

buildscript {
    ext.aws_version = AWS_CORE_SDK_VERSION

    repositories {
        mavenLocal()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        google()
        mavenCentral()
    }

    dependencies {
        classpath "com.amazonaws:aws-android-sdk-appsync-gradle-plugin:$VERSION_NAME"
        classpath 'com.android.tools.build:gradle:4.0.0'
    }
}

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    mavenLocal()
    maven {
        url "https://plugins.gradle.org/m2/"
    }
    google()
    mavenCentral()
}

dependencies {
    androidTestImplementation 'androidx.core:core:1.0.0'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    androidTestImplementation 'junit:junit:4.13'
    androidTestImplementation "com.amazonaws:aws-android-sdk-s3:$aws_version"
    androidTestImplementation "com.amazonaws:aws-android-sdk-appsync:$VERSION_NAME"
    androidTestImplementation ("com.amazonaws:aws-android-sdk-mobile-client:$aws_version@aar") { transitive = true }
    androidTestImplementation ("com.amazonaws:aws-android-sdk-auth-userpools:$aws_version@aar") { transitive = true }
    androidTestImplementation ("com.amazonaws:aws-android-sdk-cognitoauth:$aws_version@aar")
}
