apply plugin: 'com.android.application'

def cfg = rootProject.ext.configuration
def libs = rootProject.ext.libraries

android {
    compileSdkVersion cfg.compileVersion
    buildToolsVersion cfg.buildToolsVersion
    defaultConfig {
        applicationId "com.richardliu.jesmvp"
        minSdkVersion cfg.minSdk
        targetSdkVersion cfg.targetSdk
        versionCode cfg.versionCode
        versionName cfg.versionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile "com.android.support:appcompat-v7:${libs.supportVersion}"
    compile "com.android.support.constraint:constraint-layout:${libs.constraint_layout}"
    compile "com.android.support:design:${libs.supportVersion}"
    compile "com.android.support:cardview-v7:${libs.supportVersion}"
    compile "com.android.support:support-v13:${libs.supportVersion}"
    compile "com.android.support:recyclerview-v7:${libs.supportVersion}"

    /**
     * butterknife
     */
    compile "com.jakewharton:butterknife:${libs.butterknife}"
    annotationProcessor "com.jakewharton:butterknife-compiler:${libs.butterknife}"

    /**
     * 运行时权限注解框架
     */
    compile "com.github.hotchemi:permissionsdispatcher:${libs.permissionsdispatcher}"
    annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:${libs.permissionsdispatcher}"

    /**
     *  RxJava
     */
    compile "io.reactivex:rxjava:${libs.rxjava}"
    compile "io.reactivex:rxandroid:${libs.rxandroid}"
    /**
     *  retrofit2
     */
    compile "com.squareup.retrofit2:retrofit:${libs.retrofit}"
    compile "com.squareup.retrofit2:adapter-rxjava:${libs.retrofit}"
    compile "com.squareup.retrofit2:converter-gson:${libs.retrofit}"
    compile "com.squareup.okhttp3:logging-interceptor:${libs.okhttp3_logging}"

    /**
     * Glide
     */
    compile "com.github.bumptech.glide:glide:${libs.glide}"
    compile "com.github.bumptech.glide:okhttp3-integration:${libs.glide_okhttp3}"
    compile "jp.wasabeef:glide-transformations:${libs.glide_transformations}"

    /**
     * log
     */
    compile "com.github.zhaokaiqiang.klog:library:${libs.klog}"

    /**
     * 状态栏
     */
    compile "com.jaeger.statusbaruitl:library:${libs.statusBartUtils}"

    /**
     * 图表库
     */
    compile "com.github.lecho:hellocharts-android:${libs.hellocharts}"

    /**
     * 内存检测leakcanary
     */
    debugCompile "com.squareup.leakcanary:leakcanary-android:${libs.leakcanary}"
    releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:${libs.leakcanary}"
    testCompile "com.squareup.leakcanary:leakcanary-android-no-op:${libs.leakcanary}"

    compile "com.orhanobut:hawk:${libs.hawk}"

    testCompile 'junit:junit:4.12'
}
