注册好后查看用户名密码
查看username password
maven上传脚本
//maven_aliyun.gradle
apply plugin: 'maven' //发布到maven 库中的插件
ext {
URL_RELEASE = "****"
URL_SNAPSHOT = "****"
URL_LOCAL = "file://E:/repository"
URL_TYPE = 1 /*0本地路径 1 SNAPSHOT 2 RELEASE*/
USER = "****"
PASSWORD = "****"
GROUPID = "****"
ARTIFACTID = "****"
VERSION = "1.0"
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: URL_TYPE == 0 ? URL_LOCAL : (URL_TYPE == 1 ? URL_SNAPSHOT : URL_RELEASE)) {
authentication(userName:USER , password: PASSWORD )
}
pom.project {
version VERSION
artifactId ARTIFACTID
groupId GROUPID
packaging 'aar'
description "****"
}
}
}
}
在模块项目的build.gradle下添加
apply from: 'maven_aliyun.gradle'
在其任下
image.png
执行后即可打包
网友评论