forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
165 lines (132 loc) · 4.19 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
plugins {
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'
id 'jacoco'
id 'maven'
id 'checkstyle'
id 'findbugs'
}
group = 'com.pubnub'
version = '4.23.0'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations.all {
}
lombok {
version = "1.18.4"
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.5.0'
implementation group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.12.1'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
// 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
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
implementation group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.4.0'
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.19.0'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '3.1.2'
testImplementation group: 'org.json', name: 'json', version: '20180813'
}
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")
}
tasks.withType(Checkstyle) {
exclude '**/vendor/**', '**/*Test*'
reports {
xml.enabled = true
html.enabled = true
}
}
tasks.withType(FindBugs) {
exclude '**/vendor/**'
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"
}
build.finalizedBy(shadowJar)