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

buildscript {
    ext.kotlin_version = '1.9.22'

    repositories {
        google()
        //noinspection JcenterRepositoryObsolete
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.2.2'
        classpath 'com.google.gms:google-services:4.4.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

ext {
    supportlib_version = '28.0.0'
}

//Ensure that all dependencies use the same version of the Android Support library
subprojects {
    project.configurations.configureEach {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex')) {
                details.useVersion "$supportlib_version"
            }
        }
    }
}

allprojects {
    repositories {
        google()
        //noinspection JcenterRepositoryObsolete
        jcenter()
    }
}

tasks.register('clean', Delete) {
    delete rootProject.buildDir
}
