/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * 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-kapt'

android {
    namespace "com.example.android.codelabs.paging"
    compileSdk buildConfig.compileSdk

    defaultConfig {
        applicationId "com.google.samples.apps.nowinandroid"
        minSdk buildConfig.minSdk
        targetSdk buildConfig.targetSdk
        versionCode 1
        versionName "0.0.1"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.toString()
        freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
        coreLibraryDesugaringEnabled true
    }

    buildFeatures {
        viewBinding = true
    }
}

dependencies {
    coreLibraryDesugaring libs.android.desugarJdkLibs

    implementation libs.kotlinx.coroutines.core
    implementation libs.kotlinx.coroutines.android

    implementation libs.androidx.appcompat
    implementation libs.androidx.recyclerview
    implementation libs.androidx.constraintlayout

    implementation libs.google.material

    // architecture components
    implementation libs.androidx.activity.ktx
    implementation libs.androidx.core.ktx
    implementation libs.androidx.core.ktx
    implementation libs.androidx.lifecycle.runtime.ktx
    implementation libs.androidx.lifecycle.viewModel.ktx
    implementation libs.androidx.paging.common.ktx
    implementation libs.androidx.paging.runtime.ktx
}
