/*
 * Copyright 2018 Andrey Tolpeev
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion rootProject.compileSdkVersion
    defaultConfig {
        applicationId 'com.travelbackintime.buybitcoin'
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        versionCode rootProject.versionCode
        versionName rootProject.versionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }

    signingConfigs {
        release {
            storeFile file(KEYSTORE_FILE)
            storePassword KEYSTORE_PASSWORD
            keyAlias KEY_ALIAS
            keyPassword KEY_PASSWORD
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            zipAlignEnabled true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix = ".debug"
        }
    }

    productFlavors {
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
    implementation "com.android.support:design:$rootProject.supportLibraryVersion"
    implementation "com.android.support:gridlayout-v7:$rootProject.supportLibraryVersion"

    implementation "com.google.dagger:dagger:$rootProject.daggerVersion"
    annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
    implementation "com.google.dagger:dagger-android-support:$rootProject.daggerVersion"
    annotationProcessor "com.google.dagger:dagger-android-processor:$rootProject.daggerVersion"

    implementation("com.philliphsu:bottomsheetpickers:$rootProject.bottomsheetpickers") {
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'gridlayout-v7'
    }
    implementation "com.google.firebase:firebase-core:$rootProject.playServices"
    implementation "com.google.firebase:firebase-crash:$rootProject.playServices"
    implementation "com.google.firebase:firebase-ads:$rootProject.playServices"
    implementation "com.google.firebase:firebase-config:$rootProject.playServices"
    implementation "com.google.firebase:firebase-database:$rootProject.playServices"
    implementation("com.crashlytics.sdk.android:crashlytics:$rootProject.crashlytics") {
        transitive = true
    }
    implementation "pl.droidsonroids.gif:android-gif-drawable:$rootProject.gif"

    implementation "com.facebook.android:facebook-share:$rootProject.facebookShare"
    implementation "com.twitter.sdk.android:tweet-composer:$rootProject.tweetComposer"


    testImplementation "junit:junit:$rootProject.junitVersion"
}

apply plugin: 'com.google.gms.google-services'
