/*
 * Copyright (C) 2018 Emre Eran
 *
 * 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: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.emreeran.locationlivedata"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    dataBinding {
        enabled = true
    }

    lintOptions {
        lintConfig rootProject.file('lint.xml')
    }
}

dependencies {
    // Library
    implementation project(':locationlivedata')

    // Kotlin
    implementation deps.kotlin.stdlib

    implementation deps.app_compat
    implementation deps.material
    implementation deps.navigation.fragment
    implementation deps.navigation.ui
    implementation deps.navigation.fragment_ktx
    implementation deps.navigation.ui_ktx
    implementation deps.core_ktx
    implementation deps.constraint_layout

    implementation deps.play_services_location

    // Lifecycle
    implementation deps.lifecycle.runtime
    implementation deps.lifecycle.extensions
    implementation deps.lifecycle.java8

    // Timber
    implementation deps.timber

    // Lifecycle
    kapt deps.lifecycle.compiler

    testImplementation deps.junit
    androidTestImplementation deps.test.runner
    androidTestImplementation deps.test.espresso_core
}
