apply plugin: 'com.android.application'
apply from: '../build-config/gradle-quality.gradle'

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

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

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

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

        buildConfigField "String", "EVERNOTE_CONSUMER_KEY", (project.hasProperty('EVERNOTE_CONSUMER_KEY') ? "\"$EVERNOTE_CONSUMER_KEY\"" : "\"Your consumer key\"")
        buildConfigField "String", "EVERNOTE_CONSUMER_SECRET", (project.hasProperty('EVERNOTE_CONSUMER_SECRET') ? "\"$EVERNOTE_CONSUMER_SECRET\"" : "\"Your consumer secret\"")
        buildConfigField "String", "EVERNOTE_DEVELOPER_KEY", (project.hasProperty('EVERNOTE_DEVELOPER_KEY') ? "\"$EVERNOTE_DEVELOPER_KEY\"" : "null")
        buildConfigField "String", "EVERNOTE_NOTE_STORE_URL", (project.hasProperty('EVERNOTE_NOTE_STORE_URL') ? "\"$EVERNOTE_NOTE_STORE_URL\"" : "null")
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    lintOptions {
        abortOnError true

        htmlOutput file("$project.buildDir/reports/lint/lint.html")
        xmlOutput file("$project.buildDir/reports/lint/lint.xml")
    }
}

dependencies {
    compile project(':library')
    compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibVersion"
    compile "com.android.support:design:$rootProject.ext.supportLibVersion"
    compile 'com.evernote:android-intent:1.0.1'
}
