forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
213 lines (172 loc) · 5.96 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'io.franzbecker.gradle-lombok' version '1.14'
id 'com.github.johnrengelman.shadow' version '4.0.2'
id 'com.bmuschko.nexus' version '2.3.1'
id 'com.github.ben-manes.versions' version '0.20.0'
id 'java-library'
id 'jacoco'
id 'maven'
id 'checkstyle'
id 'findbugs'
}
group = 'com.pubnub'
version = '5.2.3'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations.all {
}
lombok {
version = "1.18.4"
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.test.runtimeClasspath
runtimeClasspath += sourceSets.test.runtimeClasspath
}
}
dependencies {
implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.6.2'
api group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.12.6'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.28'
// jackson
// compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.7.3'
// compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.7.3'
// compile group: 'com.squareup.retrofit2', name: 'converter-jackson', version:'2.1.0'
// gson
api 'com.google.code.gson:gson:2.8.6'
implementation group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.6.2'
// cbor
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.3'
implementation 'org.jetbrains:annotations:17.0.0'
testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3'
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testImplementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version: '2.25.0'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.0.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.6.0'
integrationTestImplementation group: 'org.aeonbits.owner', name: 'owner', version: '1.0.8'
implementation group: 'org.json', name: 'json', version: '20190722'
testImplementation group: 'io.cucumber', name: 'cucumber-java', version: '6.10.4'
testImplementation group: 'io.cucumber', name: 'cucumber-junit', version: '6.10.4'
testImplementation group: 'io.cucumber', name: 'cucumber-picocontainer', version: '6.10.4'
testImplementation group: 'org.aeonbits.owner', name: 'owner', version: '1.0.8'
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task integrationTest(type: Test) {
group = "verification"
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath += sourceSets.integrationTest.runtimeClasspath
}
jacoco {
toolVersion = "0.8.2"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
checkstyle {
toolVersion = "8.14"
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
//configFile = new File(rootDir, "config/checkstyle/checkstyle.xml")
sourceSets = [sourceSets.main]
}
findbugs {
excludeFilter = rootProject.file("config/findbugs/excludeFilter.xml")
sourceSets = [sourceSets.main]
}
tasks.withType(Checkstyle) {
exclude '**/vendor/**', '**/*Test*'
reports {
xml.enabled = true
html.enabled = true
}
}
tasks.withType(FindBugs) {
exclude '**/vendor/**', '**/*Test*'
reports {
xml.enabled false
html.enabled true
}
}
check.dependsOn jacocoTestReport
extraArchive {
sources = false
tests = true
javadoc = true
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
}
modifyPom {
project {
name 'PubNub Java SDK'
description 'PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of\n' +
' broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter\n' +
' second!'
url 'https://github.com/pubnub/java'
inceptionYear '2009'
scm {
url 'https://github.com/pubnub/java'
}
licenses {
license {
name 'MIT License'
url 'https://github.com/pubnub/pubnub-api/blob/master/LICENSE'
distribution 'repo'
}
}
developers {
developer {
id 'PubNub'
name 'PubNub'
email '[email protected]'
}
}
}
}
import io.franzbecker.gradle.lombok.task.DelombokTask
task delombok(type: DelombokTask, dependsOn: compileJava) {
ext.outputDir = file("$buildDir/delombok")
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
args(it, "-d", outputDir)
}
}
task delombokHelp(type: DelombokTask) {
args "--help"
}
javadoc {
dependsOn delombok
source = delombok.outputDir
destinationDir = file("docs")
options.noTimestamp = true
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from "$buildDir/delombok"
}
task cucumber(type: Test) {
systemProperty "cucumber.filter.tags", System.getProperty("cucumber.filter.tags")
systemProperty "cucumber.features", System.getProperty("cucumber.features")
systemProperty "cucumber.plugins", System.getProperty("cucumber.plugins")
}
test {
exclude '**/contract/*.class'
}
build.finalizedBy(shadowJar)