-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle
136 lines (114 loc) · 3.97 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
buildscript {
ext {
kafkaConnectApiVersion = "2.1.1"
}
}
plugins {
id 'idea'
id 'com.palantir.git-version' version '0.5.2'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id 'java'
id "com.github.spotbugs" version "2.0.0" apply false
id "net.rdrei.android.buildtimetracker" version "0.11.0"
}
task userWrapper(type: Wrapper) {
gradleVersion = '5.3.1'
}
description = "kafka-connect-dynamodb"
allprojects {
group "com.trustpilot.kafka.connect.dynamodb"
version = gitVersion()
repositories {
jcenter()
}
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
apply plugin: 'idea'
apply plugin: 'com.github.spotbugs'
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
apply plugin: "build-time-tracker"
dependencies {
def junitJupiterVersion = '5.6.2'
testImplementation "org.junit.jupiter:junit-jupiter:$junitJupiterVersion"
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testCompile "org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
implementation 'io.rest-assured:rest-assured:4.3.1'
testCompile "org.testcontainers:testcontainers:1.14.3"
testCompile "org.testcontainers:junit-jupiter:1.14.3"
testCompile "org.testcontainers:kafka:1.15.0-rc2"
testCompile "org.testcontainers:mockserver:1.15.0-rc2"
testCompile "org.mock-server:mockserver-client-java:5.11.1"
testCompile "com.google.code.gson:gson:2.8.6"
testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '2.26.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.17.1'
}
test {
exclude '**/**IT**'
useJUnitPlatform()
testLogging {
outputs.upToDateWhen {false}
events = ["passed", "failed", "skipped"]
showStandardStreams = true
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
task integrationTests(type: Test) {
dependsOn shadowJar
useJUnitPlatform()
include '**/**IT**'
testLogging {
outputs.upToDateWhen {false}
events = ["passed", "failed", "skipped"]
showStandardStreams = true
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
}
dependencies {
compile project(':source')
}
shadowJar {
dependencies {
// provided in the connect classpath
exclude(dependency("org.apache.kafka:connect-api:${rootProject.ext.kafkaConnectApiVersion}"))
exclude(dependency("org.apache.kafka:kafka-clients:${rootProject.ext.kafkaConnectApiVersion}"))
exclude(dependency('net.jpountz.lz4:.*:.*'))
exclude(dependency('org.xerial.snappy:.*:.*'))
exclude(dependency('org.slf4j:.*:.*'))
}
}
buildtimetracker {
reporters {
csv {
output "build/times.csv"
append true
header false
}
summary {
ordered false
threshold 50
barstyle "unicode"
}
csvSummary {
csv "build/times.csv"
}
}
}
defaultTasks 'clean', 'check'