// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    ext.kotlin_version = '1.3.41'
    repositories {
        google()
        jcenter()
        
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0-rc02'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0-beta02"
        classpath 'com.google.gms:google-services:4.3.0'
    }
}

plugins {
    id "com.diffplug.gradle.spotless" version "3.23.1"
}

subprojects {

    // Treat all Kotlin warnings as errors
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        kotlinOptions.allWarningsAsErrors = true
    }


    // Enable spotless for kotlin formatting.
    apply plugin: 'com.diffplug.gradle.spotless'
    spotless {
        kotlin {
            target "**/*.kt"
            ktlint("0.33.0")
            licenseHeaderFile project.rootProject.file('spotless/license.kt')
        }
    }
}


allprojects {
    repositories {
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
        google()
        jcenter()
        
    }
}