-
Notifications
You must be signed in to change notification settings - Fork 4
/
publish-utils.gradle
81 lines (71 loc) · 3.78 KB
/
publish-utils.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
/*
*
* Copyright (c) 2016 Caricah <info@caricah.com>.
*
* Caricah licenses this file to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*
*
*
*/
publishing {
publications {
IotracahMavenPublication(MavenPublication) {
from components.java
groupId 'com.caricah.iotracah'
artifactId 'broker'
version '1.0'
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
configurations = ['archives']
//publications = ['IotracahMavenPublication'] //When uploading Maven-based publication files
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
//Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
pkg {
repo = 'general-iot'
name = 'iotracah'
userOrg = 'caricah' //An optional organization name when the repo belongs to one of the user's orgs
desc = 'A distributed, fault tolerant mqtt v3.1/v3.1.1 broker for the cloud'
websiteUrl = 'http://io.tracah.com'
issueTrackerUrl = 'https://github.com/caricah/iotracah/issues'
vcsUrl = 'https://github.com/caricah/iotracah.git'
licenses = ['Apache-2.0']
labels = ['iotracah', 'iot', 'mqtt']
publicDownloadNumbers = true
githubRepo = 'caricah/iotracah' //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
//Optional version descriptor
version {
name = '1.0.0' //Bintray logical version name
desc = //Optional - Version-specific description'
released = new Date()//Optional - Date of the version release. 2 possible values: date in the format of 'yyyy-MM-dd'T'HH:mm:ss.SSSZZ' OR a java.util.Date instance
vcsTag = '1.0.0'
//Optional configuration for GPG signing
gpg {
sign = false //Determines whether to GPG sign the files. The default is false
passphrase = project.hasProperty('bintrayGpgPass') ? project.property('bintrayGpgPass') : System.getenv('BINTRAY_GPG_PASS') //Optional. The passphrase for GPG signing'
}
//Optional configuration for Maven Central sync of the version
mavenCentralSync {
sync = false //Optional (true by default). Determines whether to sync the version to Maven Central.
user = project.hasProperty('mavenUser') ? project.property('mavenUser') : System.getenv('MAVEN_SYNC_USERNAME') //OSS user token
password = project.hasProperty('mavenPassword') ? project.property('mavenPassword') : System.getenv('MAVEN_SYNC_PASSWORD') //OSS user password
close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
}
}
}
}