gradle全局使用阿里云镜像

2023年01月12日更新
推荐使用南京大学的镜像,使用文档如下

https://doc.nju.edu.cn/books/35f4a/page/gradle

全局配置文件~/.gradle/init.gradle

settingsEvaluated { settings ->
    settings.dependencyResolutionManagement {
        repositories {
            maven {
            url "https://maven.aliyun.com/repository/public"
        }
        google {
            url "https://maven.aliyun.com/repository/google"
        }
        }
    }
}
allprojects {
    repositories {
        maven {
            url "https://maven.aliyun.com/repository/public"
        }
        google {
            url "https://maven.aliyun.com/repository/google"
        }
    }

    buildscript {
        repositories {
            maven {
                url "https://maven.aliyun.com/repository/public"
            }
            google {
                url "https://maven.aliyun.com/repository/google"
            }
        }
    }
}

你可能感兴趣的:(FuckJava,gradle,阿里云,java)