-
Notifications
You must be signed in to change notification settings - Fork 1
/
bintray.gradle
79 lines (66 loc) · 2.3 KB
/
bintray.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
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
def bintrayUser
def bintrayApiKey
File propertiesFile = project.rootProject.file('local.properties')
if(propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
bintrayUser = properties.getProperty('bintray.user')
bintrayApiKey = properties.getProperty('bintray.key')
} else {
bintrayUser = System.getenv('BINTRAY_USER')
bintrayApiKey = System.getenv('BINTRAY_KEY')
}
ext.configureBintrayUploadTask = { packageName ->
final def publicationName
if(packageName.endsWith('vertx.core.ext')) {
publicationName = 'Core'
} else if(packageName.endsWith('vertx.reactivex.ext')) {
publicationName = 'RxJava2'
} else if(packageName.endsWith('vertx.rxjava.ext')) {
publicationName = 'RxJava1'
} else {
throw new IllegalArgumentException("Cannot configure publication for unexpected package name [$packageName]")
}
bintray {
user = bintrayUser
key = bintrayApiKey
publications = ["${publicationName}Publication", "${publicationName}TestHelpersPublication"]
publish = true
override = true
pkg {
repo = 'vertx-ext'
name = "$packageName"
userOrg = 'labs2160'
licenses = ['Apache-2.0']
websiteUrl = 'https://github.com/hsl43/vertx-jvm-extensions'
issueTrackerUrl = 'https://github.com/hsl43/vertx-jvm-extensions/issues'
vcsUrl = 'https://github.com/hsl43/vertx-jvm-extensions.git'
publicDownloadNumbers = true
version {
name = "$library_version"
// desc = 'Gradle Bintray Plugin 1.0 final' // TODO... optional
released = new Date()
// vcsTag = '1.3.0' // TODO... optional
// attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] // TODO... optional
}
}
}
publishing {
publications {
"${publicationName}Publication"(MavenPublication) {
groupId 'com.labs2160'
artifactId "$archivesBaseName"
artifact jar
version "$library_version"
}
"${publicationName}TestHelpersPublication"(MavenPublication) {
groupId 'com.labs2160'
artifactId "$archivesBaseName-test-helpers"
artifact testHelpersJar
version "$library_version"
}
}
}
}