-
Notifications
You must be signed in to change notification settings - Fork 4
/
upload.gradle
36 lines (33 loc) · 1017 Bytes
/
upload.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apply plugin: 'maven-publish'
//用户名
def NEXUS_USERNAME="*****"
//密码
def NEXUS_PASSWORD="*****"
//地址
def NEXUS_REPOSITORY_URL="https://s01.oss.sonatype.org/content/repositories/releases/"
def SNSPSHOT_REPOSITORY_URL = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
def VERSION = "4.4.0-SNAPSHOT"
publishing {
publications {
Production(MavenPublication) {
//包结构
groupId = "io.github.dnspod"
//项目名
artifactId = "httpdns-sdk"
//版本号
version = VERSION
//本地的文件
artifact("$buildDir/outputs/aar/HTTPDNS_Android_v4.4.0_release.aar")
}
}
repositories {
maven {
url VERSION.endsWith("SNAPSHOT") ? SNSPSHOT_REPOSITORY_URL : NEXUS_REPOSITORY_URL
credentials {
username = NEXUS_USERNAME
password = NEXUS_PASSWORD
}
allowInsecureProtocol true
}
}
}