apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    buildToolsVersion rootProject.ext.android["buildToolsVersion"]
    useLibrary 'org.apache.http.legacy'

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "<%= appPackage %>"
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]
        testInstrumentationRunner rootProject.ext.dependencies["androidJUnitRunner"]
    }
    buildTypes {

        debug {
            buildConfigField "boolean", "LOG_DEBUG", "true"
            buildConfigField "boolean", "USE_CANARY", "true"
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        release {
            buildConfigField "boolean", "LOG_DEBUG", "false"
            buildConfigField "boolean", "USE_CANARY", "false"
            minifyEnabled true
            shrinkResources true
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        disable 'InvalidPackage'
        disable "ResourceType"
        abortOnError false
    }
}

buildscript {
    repositories {
        jcenter()
    }
}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    //support
    compile(rootProject.ext.dependencies["cardview-v7"]) {
        exclude module: 'support-annotations'
    }
    //tools
    annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
    compile rootProject.ext.dependencies["progressmanager"]
    compile rootProject.ext.dependencies["retrofit-url-manager"]
    //view
    annotationProcessor(rootProject.ext.dependencies["butterknife-compiler"]) {
        exclude module: 'support-annotations'
        exclude module: 'butterknife-annotations'
    }
    compile rootProject.ext.dependencies["paginate"]
    //arms
    compile project(':arms')
//    compile 'me.jessyan:arms:2.2.3'
    //test
    testCompile rootProject.ext.dependencies["junit"]
    debugCompile rootProject.ext.dependencies["canary-debug"]
    releaseCompile rootProject.ext.dependencies["canary-release"]
    testCompile rootProject.ext.dependencies["canary-release"]
}
