gradle 下载解决方案
- 对于其余工程,可以在 gradle.properties 中加入,但 UE 每次重编会删除此文件并重新生成,所以在这里写了没用
systemProp.http.proxyHost=192.168.6.136
systemProp.http.proxyPort=808
systemProp.https.proxyHost=192.168.6.136
systemProp.https.proxyPort=808
- 对于 UE 工程只能在
UE安装目录\Engine\Build\Android\Java\gradle 中修改 build.gradle,将仓库源替换为阿里云镜像:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
//google()
//mavenCentral()
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
// jcenter()
}
dependencies {
classpath project.hasProperty('ANDROID_TOOLS_BUILD_GRADLE_VERSION') ? project.property('ANDROID_TOOLS_BUILD_GRADLE_VERSION') : 'com.android.tools.build:gradle:3.5.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
apply from: 'buildscriptAdditions.gradle', to: buildscript
}
apply from: 'baseBuildAdditions.gradle'
allprojects {
repositories {
//google()
//mavenCentral()
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
// jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}