『开发工具篇』- 配置 gradle 等相关依赖镜像源
- 1.更换gradle下载源
- 2. 配置setting.gradle
- kts文件
- gradle文件
1.更换gradle下载源
使用腾讯云的镜像库https://mirrors.cloud.tencent.com/gradle/
- gradle-x.x-all.zip:编译后的二进制发布版以及源码和文档
- gradle-x.x-src.zip:源码和文档
- gradle-x.x-bin.zip:编译后的二进制发布版
建议直接使用all,使用bin的话默认会从gradle的官方库下载src,这又会很慢。
https://mirrors.cloud.tencent.com/gradle/
2. 配置setting.gradle
kts文件
maven { url = uri("https://plugins.gradle.org/m2/") }
maven { url = uri("https://maven.aliyun.com/nexus/content/repositories/google") }
maven { url = uri("https://maven.aliyun.com/nexus/content/groups/public") }
maven { url = uri("https://maven.aliyun.com/nexus/content/repositories/jcenter") }
gradle文件
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }