This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
138 lines (119 loc) · 3.81 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
}
plugins {
id 'java'
id 'idea'
id 'application'
id 'checkstyle'
id 'jacoco'
id "com.google.protobuf" version "0.8.7"
id 'io.franzbecker.gradle-lombok' version '3.2.0'
}
group 'com.gojek.beast'
mainClassName = "com.gojek.beast.launch.Main"
task runConsumer(type: JavaExec) {
main = mainClassName
classpath = sourceSets.main.runtimeClasspath
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
buildscript.repositories.each { repositories.add(it) }
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'ch.qos.logback:logback-classic:1.1.9'
compile 'ch.qos.logback:logback-core:1.1.9'
compile 'com.getsentry.raven:raven-logback:7.8.1'
compile group: 'io.sentry', name: 'sentry', version: '1.7.16'
compile 'io.sentry:sentry-logback:1.7.16'
compile(group: 'com.gojek', name: 'config', version: '0.2.6') {
exclude group: 'org.slf4j', module: 'slf4j-simple'
}
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '2.0.0'
compile group: 'com.gojek', name: 'stencil', version: '4.2.1'
compile group: 'com.timgroup', name: 'java-statsd-client', version: '3.1.0'
compile group: 'com.getsentry.raven', name: 'raven', version: '8.0.3'
compile group: 'com.getsentry.raven', name: 'raven-logback', version: '7.8.0'
compile group: 'com.google.cloud', name: 'google-cloud-storage', version: '1.101.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
compile 'org.aeonbits.owner:owner:1.0.10'
compile 'com.google.cloud:google-cloud-bigquery:1.115.0'
compile 'com.google.protobuf:protobuf-java:3.1.0'
compile 'com.google.protobuf:protobuf-java-util:3.1.0'
testCompile group: 'junit', name: 'junit', version: '4.13-beta-1'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.23.4'
testCompile 'org.awaitility:awaitility:3.1.5'
testCompile gradleTestKit()
}
protobuf {
generatedFilesBaseDir = "$projectDir/src/test/generated"
protoc {
artifact = "com.google.protobuf:protoc:3.1.0"
}
generateProtoTasks {
all().each { task ->
task.generateDescriptorSet = true
task.descriptorSetOptions.includeSourceInfo = false
task.descriptorSetOptions.includeImports = true
task.descriptorSetOptions.path = "$projectDir/src/test/resources/__files/descriptors.bin"
}
}
}
jar {
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Main-Class': mainClassName
}
}
idea {
module {
testSourceDirs += file("$projectDir/src/generated/test/java")
}
}
sourceSets {
main.java.srcDir "src/main/java"
main.resources.srcDir "src/main/resources"
}
test {
forkEvery = 1
testLogging {
events "PASSED", "STARTED", "FAILED", "SKIPPED"
}
}
checkstyle {
toolVersion '7.6.1'
configFile file("config/checkstyle/checkstyle.xml")
}
checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
tasks.withType(Checkstyle) {
exclude '**/test/generated/**'
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled = true
html.destination file("${reportsDir}/jacoco/")
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/config/**', '**/factory/**', '**/exception/**', '**/serializer/**', '**/Clock**', '**/models/**', '**/launch/**', '**/stats/**'])
})
}
}
tasks.withType(Test) {
finalizedBy jacocoTestReport
}