buildscript {
    repositories {
        google()
        mavenCentral()
        //推送依赖的仓库
        maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
        // 配置HMS Core SDK的Maven仓地址。
        maven {url 'https://developer.huawei.com/repo/'}
        maven {url 'https://developer.hihonor.com/repo'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.3.0'  
        // classpath 'com.android.tools.build:gradle:8.6.0'  
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22" // 如果用 kotlin，也要匹配版本
        //推送配置
        classpath 'com.huawei.agconnect:agcp:1.9.1.300'  // 1.6.0.300 ，1.9.1.300
        classpath 'com.hihonor.mcs:asplugin:2.0.1.300' 
        // 海外手机配置FCM
        // classpath 'com.google.gms:google-services:4.3.15'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        // 裁剪依赖
        maven { url 'https://jitpack.io' }
        //推送依赖的仓库
        maven { url 'https://developer.huawei.com/repo/' }
        maven { url 'https://developer.hihonor.com/repo' }
        maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
    }
}

rootProject.buildDir = "../build"
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    configurations.all {
    resolutionStrategy {
        // 崩溃原因1.12.0,有点旧没有新方法，升级到1.3解决键盘崩溃的问题
        force 'androidx.core:core:1.13.0'
        force 'androidx.core:core-ktx:1.13.0'
    }
}
}
subprojects {
    project.evaluationDependsOn(":app")
}

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

