wjc
2025-04-25 a17869744eeea710c9ee15eadb3837cd4ed0bcd7
build.gradle
@@ -2,6 +2,9 @@
buildscript {
    ext {
        agp_version = '4.1.3'
    }
    repositories {
        google()
        mavenCentral()
@@ -10,12 +13,17 @@
        maven {
            url "https://jitpack.io"
        }
        maven { url 'https://developer.huawei.com/repo/' }//(华为极光推送)
        maven { url 'https://repo1.maven.org/maven2/' }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.2"
        classpath "com.android.tools.build:gradle:$agp_version"
        classpath 'io.github.didi.dokit:dokitx-plugin:3.5.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        //增加AGC插件配置,以便能同步“agconnect-services.json”文件中的信息.(华为极光推送)
        classpath 'com.huawei.agconnect:agcp:1.6.1.300'
    }
}
@@ -39,9 +47,27 @@
            }
            url 'https://packages.aliyun.com/maven/repository/2012126-release-Mc0DNo/'
        }
        //(华为极光推送)
        maven {
            url 'https://developer.huawei.com/repo/'
        }
        maven { url 'https://repo1.maven.org/maven2/' }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
// 保证dex_files文件中指定的文件都加载到Main Dex中
afterEvaluate {
    tasks.matching {
        it.name.startsWith('dex')
    }.each { dx ->
        if (dx.additionalParameters == null) {
            dx.additionalParameters = []
        }
        dx.additionalParameters += '--multi-dex'
        dx.additionalParameters += "--main-dex-list=$projectDir/dex_files".toString()
    }
}