/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * 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'

android {
    compileSdkVersion 32

    defaultConfig {
        applicationId "com.google.samples.apps.ourstreets"
        minSdkVersion 21
        targetSdkVersion 32
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        // This url is being defined in gradle.properties and can be changed from there.
        buildConfigField "String", "GALLERIES_URL", "\"${galleries_url}\""
        buildConfigField "String", "DETAIL_URL", "\"${detail_url}\""
    }
    buildTypes {
        debug {
            resValue "string", "google_maps_key", "\"${maps_api_key}\""
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            resValue "string", "google_maps_key", "\"${maps_api_key}\""
        }
    }
    packagingOptions {
        resources {
            excludes += ['META-INF/LICENSE', 'META-INF/LICENSE-FIREBASE.txt', 'META-INF/NOTICE']
        }
    }
}

ext {
    firebaseVersion = "2.3.1"
    mapsVersion = "18.0.2"
    mapsUtilsVersion = "0.4"
    hamcrestVersion = "1.3"
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.material:material:1.6.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation "com.firebase:firebase-client-android:${firebaseVersion}"
    implementation "com.google.android.gms:play-services-maps:${mapsVersion}"
    implementation "com.google.maps.android:android-maps-utils:${mapsUtilsVersion}"

    testImplementation "androidx.test:runner:1.4.0"
    testImplementation 'junit:junit:4.13.2'
    testImplementation "org.hamcrest:hamcrest-core:${hamcrestVersion}"
    testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}"
}
