plugins {
    id 'com.android.application'
    id 'kotlin-android'
    // [START maps_android_secrets_gradle_plugin]
    id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
    // [END maps_android_secrets_gradle_plugin]
}

android {
    compileSdkVersion 30
    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "com.google.maps.example"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    flavorDimensions "version"

    productFlavors {
        gms {
            dimension "version"
            applicationIdSuffix ".gms"
            versionNameSuffix "-gms"
        }
        v3 {
            dimension "version"
            applicationIdSuffix ".v3"
            versionNameSuffix "-v3"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'
    implementation 'com.android.volley:volley:1.2.0'

    gmsImplementation 'com.google.android.gms:play-services-maps:17.0.1'
    gmsImplementation 'com.google.maps.android:android-maps-utils:2.2.5'
    v3Implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'

    testImplementation 'junit:junit:4.13.2'
}

secrets {
    defaultPropertiesFileName = 'local.defaults.properties'
}
