buildscript {
    ext.kotlin_version = '1.8.20'
    repositories {
        google()
        jcenter()
        maven { url 'https://developer.huawei.com/repo/' }

//        maven {
//            url "https://dl.bintray.com/kotlin/kotlin-eap/"
//        }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.8'
//        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
        classpath 'com.huawei.agconnect:agcp:1.5.2.300'
        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
    }
}

allprojects {
    repositories {
        google()
//        jcenter()
        mavenCentral()
        maven {
            url 'https://developer.huawei.com/repo/'
        }
        maven {
            url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
        }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

configurations.all {
    resolutionStrategy {
        force 'androidx.core:core-ktx:1.6.0'
    }
}
