apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "id.co.flipbox.mvvmstarter"
        minSdkVersion 18
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

        buildConfigField 'String', 'BASE_URL', '"https://jsonplaceholder.typicode.com"'
    }

    flavorDimensions "env"
    productFlavors {
        dev { // development environment
            dimension "env"
            applicationIdSuffix ".dev"
            versionNameSuffix "-dev"
            buildConfigField 'String', 'BASE_URL', '"https://jsonplaceholder.typicode.com"'
            resValue "string", "app_name", "MVVM Starter Dev"
        }
        prod { //production environment
            dimension "env"
            buildConfigField 'String', 'BASE_URL', '"https://jsonplaceholder.typicode.com"'
            resValue "string", "app_name", "MVVM Starter"
        }
    }

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

    dataBinding {
        enabled = true
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:27.0.2'
    compile 'com.android.support:support-v4:27.0.2'
    compile 'com.android.support:design:27.0.2'
    compile 'com.google.android.gms:play-services-location:11.6.2'
    //marshmallow & up permission
    compile 'pub.devrel:easypermissions:1.0.1'
    //loader
    compile 'com.github.flipboxstudio:sosoito:v1.0.3'

    //validator
    compile 'com.github.Ilhasoft:data-binding-validator:1.0.0'
    //network-related libraries
    compile 'com.google.code.gson:gson:2.8.1'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.9.1'
    compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'

    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    // Because RxAndroid releases are few and far between, it is recommended you also
    // explicitly depend on RxJava's latest version for bug fixes and new features.
    compile 'io.reactivex.rxjava2:rxjava:2.1.2'

    compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'

    //local storage helper
    compile 'com.orhanobut:hawk:2.0.1'

    //jwt generator
    compile 'io.jsonwebtoken:jjwt:0.7.0'
}
