-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
executable file
·126 lines (106 loc) · 3.72 KB
/
build.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'java'
id 'maven'
id 'signing'
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.12.0'
}
group = 'com.genesys'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
}
dependencies {
compile 'io.swagger:swagger-annotations:1.5.15'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
compile 'com.google.code.gson:gson:2.8.1'
compile 'org.threeten:threetenbp:1.3.5'
compile 'io.gsonfire:gson-fire:1.8.1'
compile 'org.cometd.java:cometd-api:1.1.5'
compile 'org.cometd.java:cometd-java-client:4.0.4'
compile 'org.cometd.java:bayeux-api:4.0.4'
compile 'org.slf4j:slf4j-api:1.7.25'
testCompile 'junit:junit:4.12'
}
task incrementVersion {
doLast {
String[] semVer = version.split(/\./)
String major = semVer[0]
String minor = semVer[1]
String patch = semVer[2]
File propertiesFile = file("gradle.properties")
String updatedFile = propertiesFile.text.replaceFirst(/version\s*=\s*${version}/, "version=${major}.${minor}.${patch.toInteger() + 1}")
propertiesFile.setText(updatedFile)
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
task execute(type: JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
if (hasProperty('ossrhUsername') && hasProperty('ossrhPassword')) {
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Provisioning API'
description 'A Java library to interface to Genesys Provisioning public API'
url 'https://developer.genhtcc.com/api/provisioning/index.html'
scm {
connection 'scm:git:git@github.com:GenesysPureEngage/provisioning-client-java.git'
developerConnection 'scm:git:git@github.com:GenesysPureEngage/provisioning-client-java.git'
url 'https://github.com/GenesysPureEngage/provisioning-client-java'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
name 'Genesys Inc'
email 'support@genesys.com'
organization 'Genesys Inc'
organizationUrl 'https://developer.genhtcc.com'
}
}
}
}
}
}
nexusStaging {
username = ossrhUsername
password = ossrhPassword
numberOfRetries = 50
delayBetweenRetriesInMillis = 4000
}
}