apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'android-apt'
apply plugin: 'realm-android'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "ru.gdgkazan.githubmvp"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1

        buildConfigField "String", "API_ENDPOINT", '"https://api.github.com/"'
        buildConfigField "String", "CLIENT_ID", '"a3fdd48caf571dec959d"'
        buildConfigField "String", "CLIENT_SECRET", '"b67880aacbbc441fb5d61dd134c24b9539264e15"'

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

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    testOptions {
        unitTests.all { jvmArgs '-noverify' }
    }

    productFlavors {
        prod {
        }

        mock {
        }
    }

}

apply from: '../versions.gradle'

dependencies {
    compile "com.android.support:support-v4:$supportVersion"
    compile "com.android.support:support-v13:$supportVersion"
    compile "com.android.support:appcompat-v7:$supportVersion"
    compile "com.android.support:recyclerview-v7:${supportVersion}"
    compile "com.android.support:design:$supportVersion"

    compile "com.squareup.okhttp3:okhttp:$okhttpVersion"
    compile "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"

    compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
    compile "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"

    compile "io.reactivex:rxandroid:$rxandroidVersion"
    compile "io.reactivex:rxjava:$rxjavaVersion"
    compile "ru.arturvasilov:rx-loader:$rxLoaderVersion"

    compile "com.github.orhanobut:hawk:$hawkVersion"

    compile "com.jakewharton:butterknife:$butterKnifeVersion"
    apt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

    testCompile "junit:junit:$junitVersion"
    testCompile "org.mockito:mockito-core:$mockitoVersion"
    testCompile "org.powermock:powermock-api-mockito:$powerMockVersion"
    testCompile "org.powermock:powermock-module-junit4:$powerMockVersion"
    testCompile("org.robolectric:robolectric:$robolectricVersion") {
        exclude group: 'commons-logging', module: 'commons-logging'
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
    }
    androidTestCompile "com.android.support:support-v4:${supportVersion}"
    androidTestCompile "com.android.support:appcompat-v7:$supportVersion"
    androidTestCompile "com.android.support:recyclerview-v7:${supportVersion}"
    androidTestCompile "com.android.support:design:$supportVersion"

    androidTestCompile "com.android.support.test:runner:${runnerVersion}"
    androidTestCompile "com.android.support.test:rules:${runnerVersion}"
    androidTestCompile "com.android.support.test.espresso:espresso-core:${espressoVersion}"
    androidTestCompile "com.android.support.test.espresso:espresso-intents:${espressoVersion}"
    androidTestCompile "com.android.support.test.espresso:espresso-contrib:${espressoVersion}"
}
