apply plugin: 'com.android.application'

apply plugin: 'com.google.android.gms.oss-licenses-plugin'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'io.fabric'

android {
    signingConfigs {
        release {
            storeFile file(STORE_FILE)
            storePassword STORE_PASSWORD
            keyAlias = KEY_ALIAS
            keyPassword KEY_PASSWORD
        }
    }
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "playground.develop.socialnote"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 6
        versionName "v-0.0060"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary true
        signingConfig signingConfigs.release
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildTypes.each {
        it.buildConfigField 'String', "MAP_API_KEY", GOOGLE_MAP_API_KEY
        it.buildConfigField 'String', "dOne", D_ONE
        it.buildConfigField 'String', "dTwo", D_TWO
        it.buildConfigField 'String', "dThree", D_THREE
        it.buildConfigField 'String', "dFour", D_FOUR
        it.buildConfigField 'String', "dFive", D_FIVE
        it.buildConfigField 'String', "b_f", B_F
        it.buildConfigField 'String', "B_F_L", B_F_LABEL
        it.buildConfigField 'String', "B_F_H", B_F_H
        it.resValue 'string', "b", B_LABEL
        it.resValue 'string', "MAP_API_KEY", GOOGLE_MAP_API_KEY
        it.buildConfigField 'String', "webClient", WEB_CLIENT
        it.resValue 'string', "facebookAppID", FACEBOOK_APPLICATION_ID
        it.resValue 'string', "facebookProtocolScheme", FACEBOOK_LOGIN_PROTOCOL
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    dataBinding {
        enabled true
    }
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        kotlinOptions {
            jvmTarget = "1.8"
        }
    }
    androidExtensions {
        experimental = true
    }
}

dependencies {
    def room_version = "2.1.0"
    def koin_version = '2.0.1'
    def lifecycle_version = "2.1.0"
    def paging_version = "2.1.0"
    def lottie_version = "3.0.7"
    def work_version = "2.2.0"
    implementation fileTree(dir: 'libs', include: ['*.jar'])


    /**
     * WorkManager
     */
    implementation "androidx.work:work-runtime-ktx:$work_version"
    /**
     * Android Architecture Components
     */
    implementation "androidx.room:room-runtime:$room_version"
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    kapt "androidx.room:room-compiler:$room_version"
    implementation "androidx.room:room-rxjava2:$room_version"
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"
    implementation "androidx.paging:paging-runtime-ktx:$paging_version"
    implementation "androidx.paging:paging-rxjava2-ktx:$paging_version"

    /**
     * Kotlin
     */
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.1.0'

    /**
     * AndroidX
     */
    implementation 'com.google.android.material:material:1.1.0-alpha10'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
    implementation 'androidx.multidex:multidex:2.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation "androidx.preference:preference-ktx:1.1.0"

    /**
     * Firebase
     */
    implementation 'com.google.firebase:firebase-core:17.2.0'
    implementation 'com.google.firebase:firebase-auth:19.1.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:20.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'

    /**
     * Auth
     */
    implementation 'com.facebook.android:facebook-android-sdk:5.5.1'

    /**
     * RxJava & RxAndroid
     */
    implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

    /**
     * Koin
     */
    implementation "org.koin:koin-core:$koin_version"
    implementation "org.koin:koin-androidx-viewmodel:$koin_version"

    /**
     * Rich Editor
     */
    api('com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:v1.3.30')
    /**
     * EventBus
     */
    implementation 'org.greenrobot:eventbus:3.1.1'

    /**
     * AirBnb Lottie
     */
    implementation "com.airbnb.android:lottie:$lottie_version"

    implementation 'pub.devrel:easypermissions:3.0.0'
    implementation "org.jetbrains.anko:anko-commons:0.10.8"
    implementation "com.andkulikov:transitionseverywhere:2.0.0"
    implementation 'com.miguelcatalan:materialsearchview:1.4.0'
    implementation 'com.github.florent37:singledateandtimepicker:2.1.5'
    implementation 'com.afollestad.material-dialogs:core:3.1.0'
    implementation 'com.afollestad.material-dialogs:bottomsheets:3.1.0'

    implementation("io.coil-kt:coil:0.7.0")


    implementation 'com.github.mukeshsolanki:country-picker-android:2.0.1'

    implementation 'org.sufficientlysecure:html-textview:3.6'
    implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'

    implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
}
apply plugin: 'com.google.gms.google-services'
