Commit 398d6bb2 authored by shiyl's avatar shiyl

增加发布maven配置

parent 1bead902
......@@ -64,3 +64,56 @@ dependencies {
testImplementation rootProject.ext.dependencies.testImplementation
androidTestImplementation rootProject.ext.dependencies.androidTestImplementation
}
// 发布配置
apply plugin: 'maven'
apply plugin: 'signing'
ext {
GROUP = 'com.yidian.business'
ARTIFACTID = 'generalbusiness'
VERSION_NAME = '0.0.1'
}
task uploadMaven1(type: Upload) {
configuration = configurations.archives
repositories {
mavenDeployer {
repository(url: 'http://dailybuild2.yidian-inc.com:8088/repository/maven-releases/') {
authentication(userName: "android", password: "Android2017")
}
snapshotRepository(url: 'http://dailybuild2.yidian-inc.com:8088/repository/maven-snapshots/') {
authentication(userName: "android", password: "Android2017")
}
pom.groupId = GROUP
pom.artifactId = ARTIFACTID
pom.version = VERSION_NAME
pom.whenConfigured { pom ->
pom.dependencies.each { dep ->
if (dep.getVersion() == "unspecified") {
dep.setGroupId(GROUP)dge
dep.setVersion(VERSION_NAME)
}
}
}
println("${project} : ${pom.version} package success")
}
}
}
task uploadToLocal(type: Upload) {
configuration = configurations.archives
repositories {
mavenDeployer {
repository(url: uri('../../repo'))
pom.groupId = GROUP
pom.artifactId = ARTIFACTID
pom.version = VERSION_NAME
}
}
}
task uploadToMaven {
dependsOn(uploadMaven1)
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment