puzhibing
2026-08-21 5fa94b3718b4a78a4fcea4c97652b0ef20b7de3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// 注意:buildscript块必须放在最前面
buildscript {
    repositories {
        google()
        mavenCentral()
        // 添加华为仓库
        maven { url = uri("https://developer.huawei.com/repo/") }
    }
    dependencies {
        classpath("com.android.tools.build:gradle:8.12.3")
        // 添加华为推送插件的classpath
        classpath("com.huawei.agconnect:agcp:1.5.2.300") // 请确认版本号,可以使用libs.versions.toml中定义的版本
    }
}
plugins {
    alias(libs.plugins.android.application) apply false
    alias(libs.plugins.android.library) apply false
    alias(libs.plugins.kotlin.android) apply false
}