-
Notifications
You must be signed in to change notification settings - Fork 147
/
Copy pathbuild.gradle
87 lines (77 loc) · 3.01 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
/*
* Copyright Aryn, Inc 2023
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java'
id 'jacoco'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.23.0'
}
dependencies {
implementation project(path: ":${rootProject.name}-common", configuration: 'shadow')
implementation group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}"
implementation group: 'org.apache.httpcomponents.core5', name: 'httpcore5', version: "5.2.2"
implementation "org.opensearch:common-utils:${common_utils_version}"
implementation group: 'com.google.guava', name: 'guava', version: '32.1.3-jre'
testImplementation (group: 'junit', name: 'junit', version: '4.13.2') {
exclude module : 'hamcrest'
exclude module : 'hamcrest-core'
}
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'
testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
testImplementation group: 'org.json', name: 'json', version: '20231013'
testImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
testImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}")
testImplementation group: 'com.networknt' , name: 'json-schema-validator', version: '1.4.0'
testImplementation 'com.jayway.jsonpath:json-path:2.9.0'
}
test {
include "**/*Tests.class"
jvmArgs '-Dtests.security.manager=false'
}
jacocoTestReport {
reports {
xml.getRequired().set(true)
csv.getRequired().set(false)
html.getRequired().set(true)
}
dependsOn test
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
minimum = 0.7 //TODO: increase coverage to 0.8
}
limit {
counter = 'BRANCH'
minimum = 0.8 //TODO: increase coverage to 0.9
}
}
}
dependsOn jacocoTestReport
}
check.dependsOn jacocoTestCoverageVerification
spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'
eclipse().withP2Mirrors(Map.of("https://download.eclipse.org/", "https://mirror.umd.edu/eclipse/")).configFile rootProject.file('.eclipseformat.xml')
}
}