forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
57 lines (48 loc) · 1.52 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
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
plugins {
id 'antlr'
id 'idea'
id 'data-prepper.publish'
}
group = 'org.opensearch.dataprepper.core'
ext {
antlrGeneratedPackageDirectory = "org/opensearch/dataprepper/logstash/"
}
dependencies {
antlr('org.antlr:antlr4:4.10.1') {
exclude group: 'org.glassfish', module: 'javax.json'
}
implementation project(':data-prepper-api')
implementation project(':data-prepper-plugins:date-processor')
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation libs.commons.lang3
testImplementation testLibs.slf4j.simple
}
generateGrammarSource {
maxHeapSize = '128m'
arguments += ['-listener', '-visitor']
outputDirectory = new File("build/generated-src/antlr/main/${antlrGeneratedPackageDirectory}")
}
compileJava.dependsOn generateGrammarSource
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule { //in addition to core projects rule - this one checks for 100% code coverage for this project
limit {
minimum = 1.0 //keep this at 100%
}
}
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: ["${antlrGeneratedPackageDirectory}/**"])
}))
}
}
tasks.named('sourcesJar').configure {
dependsOn 'generateGrammarSource'
}