buildscript {
    repositories {
        jcenter()
        mavenCentral()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0-beta05'
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.0"
    defaultConfig {
        applicationId "com.android.wallpaper"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        debug {
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    flavorDimensions "default"

    productFlavors {
        aosp {
            dimension "default"
            applicationId 'com.android.wallpaper'
            testApplicationId 'com.android.wallpaper.tests'
        }
    }

    sourceSets {
        main {
            java.srcDirs = ["src", "src_override"]
            res.srcDirs = ["res"]
            manifest.srcFile "AndroidManifest.xml"
        }

        androidTest {
            res.srcDirs = ["tests/res"]
            java.srcDirs = ["tests/src"]
            manifest.srcFile "tests/AndroidManifest.xml"
        }
    }

    lintOptions {
        abortOnError false
    }

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

final String ANDROID_X_VERSION = "1.0.0-alpha1"

repositories {
    maven { url "../../../prebuilts/maven_repo/bumptech" }
    mavenCentral()
    google()
    jcenter()
    mavenCentral()
}

dependencies {
    implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
    implementation "androidx.cardview:cardview:${ANDROID_X_VERSION}"
    implementation "androidx.appcompat:appcompat:${ANDROID_X_VERSION}"
    implementation "androidx.exifinterface:exifinterface:${ANDROID_X_VERSION}"
    implementation "com.google.android.material:material:${ANDROID_X_VERSION}"

    implementation 'com.android.volley:volley:1.1.0'

    implementation 'com.github.bumptech.glide:glide:SNAPSHOT'
    implementation 'com.github.bumptech.glide:disklrucache:SNAPSHOT'
    implementation 'com.github.bumptech.glide:gifdecoder:SNAPSHOT'
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0'

    androidTestImplementation('junit:junit:4.12')
    androidTestImplementation('com.android.support.test:runner:1.0.1')
    androidTestImplementation('org.robolectric:robolectric:3.4.2') {
        exclude group: 'xmlpull'
    }
    androidTestImplementation('com.thoughtworks.xstream:xstream:1.4.8');
    androidTestImplementation 'org.mockito:mockito-core:1.10.19'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.1'
}