This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 186
/
build.gradle
84 lines (73 loc) · 2.22 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
plugins {
id 'java'
id "io.freefair.lombok"
id 'jacoco'
id 'antlr'
}
repositories {
mavenCentral()
}
generateGrammarSource {
arguments += ['-visitor', '-package', 'com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser']
source = sourceSets.main.antlr
outputDirectory = file("build/generated-src/antlr/main/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/parser")
}
configurations {
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}
dependencies {
antlr "org.antlr:antlr4:4.7.1"
compile "org.antlr:antlr4-runtime:4.7.1"
// https://github.com/google/guava/wiki/CVE-2018-10237
compile group: 'com.google.guava', name: 'guava', version: '29.0-jre'
compile group: 'org.json', name: 'json', version: '20180813'
compile group: 'org.springframework', name: 'spring-context', version: '5.2.20.RELEASE'
compile group: 'org.springframework', name: 'spring-beans', version: '5.2.20.RELEASE'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.11.1'
compile project(':common')
compile project(':core')
compile project(':protocol')
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1'
testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3'
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
html.enabled true
xml.enabled true
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/antlr/parser/**'])
}))
}
}
test.finalizedBy(project.tasks.jacocoTestReport)
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 1.0
}
}
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/antlr/parser/**'])
}))
}
}
check.dependsOn jacocoTestCoverageVerification