base_maven_push.gradle
783 Bytes
apply plugin: 'maven'
uploadArchives() {
repositories {
mavenDeployer {
def lib = moudle_cnlive_base
//发布环境(正式/测试)
android.defaultPublishConfig lib.debug ? "debug" : "release"
//发布渠道(地址/账号)
repository(url: maven.mixedUrl) {
authentication(userName: maven.username, password: maven.password)
}
//发布信息(包名/别名/版本)
pom.project {
groupId lib.packeg
artifactId lib.name
version = lib.debug ? lib.version.concat("-SNAPSHOT") : lib.version
}
pom.whenConfigured { pom ->
pom.dependencies.clear()
}
}
}
}