apply plugin: 'com.android.application'
apply plugin: 'realm-android'

android {
    compileSdkVersion rootProject.ext["compileSdkVersion"]
    buildToolsVersion rootProject.ext["buildToolsVersion"]

    defaultConfig {
        applicationId "cn.dong.demo"
        minSdkVersion rootProject.ext["minSdkVersion"]
        targetSdkVersion rootProject.ext["targetSdkVersion"]
        versionCode 1
        versionName "1.0"
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        exclude 'META-INF/maven/com.squareup.okio/okio/pom.properties'
        exclude 'META-INF/maven/com.squareup.okio/okio/pom.xml'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

    signingConfigs {
        release {
            if (project.hasProperty('STOREFILE')) {
                storeFile file(STOREFILE)
                storePassword STOREPASSWORD
                keyAlias KEYALIAS
                keyPassword KEYPASSWORD
            }
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
    compile "com.android.support:design:$rootProject.ext.supportLibraryVersion"
    compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
    compile "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion"
    compile 'io.reactivex:rxjava:1.1.0'
    compile 'io.reactivex:rxandroid:1.1.0'
    compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.jakewharton.timber:timber:4.1.1'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'me.grantland:autofittextview:0.2.1'
    debugCompile "com.facebook.stetho:stetho:$rootProject.ext.stethoVersion"
    debugCompile "com.facebook.stetho:stetho-okhttp3:$rootProject.ext.stethoVersion"
}
