forked from opendistro-for-elasticsearch/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (51 loc) · 1.55 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
apply from: file("${rootDir}/build-resources.gradle")
allprojects {
group = 'com.amazon'
version = '0.7.0-alpha'
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
sourceCompatibility = '1.8'
dependencies {
implementation "com.google.guava:guava:${versionMap.guava}"
implementation "org.apache.logging.log4j:log4j-core:${versionMap.log4j_core}"
implementation "org.slf4j:slf4j-api:${versionMap.slf4j_api}"
implementation "org.slf4j:slf4j-log4j12:${versionMap.slf4j_log4j12}"
testImplementation("junit:junit:${versionMap.junit}") {
exclude group: 'org.hamcrest' // workaround for jarHell
}
}
build.dependsOn test
}
configure(coreProjects) {
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/jacocoHtml")
}
}
test {
useJUnit()
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule {
limit {
minimum = 0.65 //TODO increase this to 0.75
}
}
}
}
check.dependsOn jacocoTestCoverageVerification
}