//配置插件仓库(仓库匹配策略:从上往下依次匹配) pluginManagement { repositories { //阿里仓库加速 maven { url 'https://maven.aliyun.com/repository/google' //如果阿里仓库找不到,就去华为加速 artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/public' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/jcenter' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } //maven { url "https://kotlin.bintray.com/kotlinx/" } //原生仓库地址 google() mavenCentral() maven { url 'https://jitpack.io' } gradlePluginPortal() } } //配置依赖下载仓库以及策略(仓库匹配策略:从上往下依次匹配) dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { //阿里仓库加速 maven { url 'https://maven.aliyun.com/repository/google' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/public' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } maven { url 'https://maven.aliyun.com/repository/jcenter' artifactUrls 'https://repo.huaweicloud.com/repository/maven' } //原生仓库地址 //maven { url "https://kotlin.bintray.com/kotlinx/" } google() mavenCentral() maven { url 'https://jitpack.io' } } } //gradle多模块构建 //指定root根项目模块名称 rootProject.name = 'wechat-robot' //指定子模块 //include(':') //指定外部构建模块 //includeBuild('')