forked from opendistro-for-elasticsearch/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (75 loc) · 2.12 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
plugins {
id "com.diffplug.spotless" version "5.12.4"
}
apply from: file("${rootDir}/build-resources.gradle")
allprojects {
apply plugin: 'com.diffplug.spotless'
group = 'com.amazon'
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
spotless {
format 'markdown', {
target '*.md'
// TODO: enrich format rules
endWithNewline()
}
format 'misc', {
target '.gitignore', '*.yml', '*.yaml'
// TODO: enrich format rules
trimTrailingWhitespace()
endWithNewline()
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
sourceCompatibility = '1.8'
spotless {
java {
// TODO: enrich format rules
removeUnusedImports()
}
}
dependencies {
implementation "com.google.guava:guava:29.0-jre"
implementation "org.apache.logging.log4j:log4j-core:2.14.0"
implementation "org.slf4j:slf4j-api:1.7.30"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.14.0"
testImplementation("junit:junit:4.13") {
exclude group: 'org.hamcrest' // workaround for jarHell
}
}
build.dependsOn test
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
task allDeps(type: DependencyReportTask) {}
}
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
}
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule {
limit {
minimum = 0.65 //TODO increase this to 0.75
}
}
}
}
check.dependsOn jacocoTestCoverageVerification
}