forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
152 lines (120 loc) · 4.23 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
id 'io.franzbecker.gradle-lombok' version '5.0.0'
id 'com.github.johnrengelman.shadow' version '4.0.2'
id 'com.github.ben-manes.versions' version '0.20.0'
id "com.vanniktech.maven.publish" version '0.22.0'
id 'java-library'
id 'jacoco'
id 'checkstyle'
}
group = 'com.pubnub'
version = '6.4.5'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations.all {
}
lombok {
version = "1.18.30"
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.test.runtimeClasspath
runtimeClasspath += sourceSets.test.runtimeClasspath
}
}
configurations {
allTest
integrationTestImplementation { extendsFrom allTest }
testImplementation { extendsFrom allTest }
}
dependencies {
implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.6.2'
api group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '4.10.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.28'
// gson
api 'com.google.code.gson:gson:2.9.0'
implementation group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.6.2'
// cbor
implementation 'co.nstant.in:cbor:0.9'
implementation 'org.jetbrains:annotations:23.0.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3'
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
testImplementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9'
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version: '2.27.2'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.0.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.8.1'
integrationTestImplementation group: 'org.aeonbits.owner', name: 'owner', version: '1.0.8'
implementation group: 'org.json', name: 'json', version: '20231013'
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"
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.8.2'
}
jacoco {
toolVersion = "0.8.11"
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
checkstyle {
toolVersion = "8.14"
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
sourceSets = [sourceSets.main]
}
tasks.withType(Checkstyle) {
exclude '**/vendor/**', '**/*Test*'
reports {
xml.required = true
html.required = true
}
}
check.dependsOn jacocoTestReport
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 {
useJUnitPlatform()
exclude '**/contract/*.class'
}
build.finalizedBy(shadowJar)
build.dependsOn compileIntegrationTestJava