基本配置

在项目根目录的build.gradle文件添加以下节点,其中username、password单独给出。

allprojects {
    repositories {
        //省略其他...
        maven {
            url 'https://maven.aliyun.com/repository/public'
        }
        maven {
            credentials {
                username 'xxxxx'
                password 'xxxxx'
            }
            url 'https://packages.aliyun.com/maven/repository/2133730-release-As2rFV/'
        }
        maven {
            credentials {
                username 'xxxxx'
                password 'xxxxx'
            }
            url 'https://packages.aliyun.com/maven/repository/2133730-snapshot-6euW51/'
        }
    }
}