apply plugin: 'com.android.application'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'de.mobilej.unmock'
apply from: "$rootDir/gradle/gradle-quality.gradle"

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.evernote.android.state.demo.java8"

        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        versionName project.VERSION_NAME
        versionCode Integer.parseInt(project.VERSION_CODE)

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    testOptions {
        unitTests.returnDefaultValues = true
        unitTests.includeAndroidResources = true
        unitTests.all {
            testLogging {
                events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
            }
        }
    }

    buildTypes {
        debug {
            minifyEnabled true
            testProguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
        }

        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
        }
    }

    lintOptions {
        abortOnError true
    }
}

dependencies {
    implementation project(':library')
    annotationProcessor project(':processor')

    implementation "androidx.appcompat:appcompat:1.0.0"

    androidTestImplementation "androidx.annotation:annotation:1.0.0"
    androidTestImplementation "com.android.support.test:runner:$testRuleVersion"
    androidTestImplementation "com.android.support.test:rules:testRuleVersion"
    androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
    androidTestImplementation "com.squareup.assertj:assertj-android:$assertjAndroidVersion"

    testImplementation "junit:junit:$junitVersion"
    testImplementation "org.assertj:assertj-core:$assertjVersion"

    unmock rootProject.ext.unmockVersion
}

uploadArchives.enabled false