-
Notifications
You must be signed in to change notification settings - Fork 7
/
maven.gradle
88 lines (73 loc) · 2.27 KB
/
maven.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory-upload'
group = GROUP
boolean isReleaseBuild = gradle.startParameter.taskNames.contains('bintrayUpload')
version = isReleaseBuild ? VERSION_NAME : "$VERSION_NAME-SNAPSHOT"
logger.info("Using version=$project.version")
apply from: "$rootDir/gradle/artifacts.gradle"
install {
repositories.mavenInstaller.pom.project {
name POM_NAME
description POM_DESCRIPTION
packaging POM_PACKAGING
url POM_URL
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
developers {
developer {
id 'yoojia'
name 'Yoojia Chen'
}
}
}
}
artifactory {
contextUrl = 'https://oss.jfrog.org'
publish {
repository {
repoKey = 'oss-snapshot-local'
if (project.hasProperty('bintrayUser')) {
username = project.property('bintrayUser')
password = project.property('bintrayKey')
}
}
defaults {
publishConfigs('archives')
}
}
}
bintray {
configurations = ['archives']
publish = true
pkg {
repo = 'maven'
name = BINTRAY_PROJECT_NAME
userOrg = 'parkingwang'
licenses = ['Apache-2.0']
labels = ['version', 'upgrade', 'android']
websiteUrl = 'https://github.com/parkingwang/next-version'
issueTrackerUrl = 'https://github.com/parkingwang/next-version/issues'
vcsUrl = 'https://github.com/parkingwang/next-version.git'
}
}
if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
bintray.user = project.bintrayUser
bintray.key = project.bintrayKey
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
def sync = bintray.pkg.version.mavenCentralSync
sync.sync = true
sync.user = project.sonatypeUsername
sync.password = project.sonatypePassword
}