环境配置
Gradle¶
环境变量¶
mavenLocal()
查找顺序:${USER_HOME}/.m2/settings.xml
、${M2_HOME}/conf/settings.xml
、${USER_HOME}/.m2/repository
配置文件¶
-
${GRADLE_USER_HOME}/init.gradle
项目中不配置
repositories
时的默认源initscript { repositories { mavenLocal() maven { url("https://maven.aliyun.com/repository/public") } maven { url("https://maven.aliyun.com/repository/google") } maven { url("https://maven.aliyun.com/repository/gradle-plugin") } maven { url("https://maven.aliyun.com/repository/spring") } maven { url("https://maven.aliyun.com/repository/spring-plugin") } } } buildscript { repositories { mavenLocal() maven { url("https://maven.aliyun.com/repository/public") } maven { url("https://maven.aliyun.com/repository/google") } maven { url("https://maven.aliyun.com/repository/gradle-plugin") } maven { url("https://maven.aliyun.com/repository/spring") } maven { url("https://maven.aliyun.com/repository/spring-plugin") } } } allprojects { repositories { mavenLocal() maven { url("https://maven.aliyun.com/repository/public") } maven { url("https://maven.aliyun.com/repository/google") } maven { url("https://maven.aliyun.com/repository/gradle-plugin") } maven { url("https://maven.aliyun.com/repository/spring") } maven { url("https://maven.aliyun.com/repository/spring-plugin") } } }
-
gradle/wrapper/gradle-wrapper.properties