forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
115 lines (106 loc) · 4.41 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
dependencies {
implementation project(':data-prepper-api')
implementation libs.armeria.core
testImplementation project(':data-prepper-api').sourceSets.test.output
implementation project(':data-prepper-plugins:aws-plugin-api')
implementation project(':data-prepper-plugins:buffer-common')
implementation project(':data-prepper-plugins:common')
implementation project(':data-prepper-plugins:failures-common')
implementation project(':data-prepper-plugins:http-common')
implementation libs.opensearch.client
implementation libs.opensearch.rhlc
implementation libs.opensearch.java
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:http-client-spi'
implementation 'software.amazon.awssdk:sdk-core'
implementation 'software.amazon.awssdk:aws-core'
implementation 'software.amazon.awssdk:regions'
implementation 'software.amazon.awssdk:utils'
implementation 'software.amazon.awssdk:sts'
implementation 'software.amazon.awssdk:url-connection-client'
implementation 'software.amazon.awssdk:arns'
implementation 'io.micrometer:micrometer-core'
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:opensearchserverless'
implementation libs.commons.lang3
implementation libs.caffeine
implementation 'software.amazon.awssdk:apache-client'
implementation 'software.amazon.awssdk:netty-nio-client'
implementation 'co.elastic.clients:elasticsearch-java:7.17.0'
implementation('org.apache.maven:maven-artifact:3.9.8') {
exclude group: 'org.codehaus.plexus'
}
testImplementation testLibs.junit.vintage
testImplementation libs.commons.io
testImplementation 'net.bytebuddy:byte-buddy:1.14.17'
testImplementation 'net.bytebuddy:byte-buddy-agent:1.14.17'
testImplementation testLibs.slf4j.simple
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integrationTest/java')
}
resources.srcDir file('src/integrationTest/resources')
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: Test) {
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
useJUnitPlatform()
classpath = sourceSets.integrationTest.runtimeClasspath
systemProperty 'tests.opensearch.host', System.getProperty('tests.opensearch.host')
systemProperty 'tests.opensearch.bundle', System.getProperty('tests.opensearch.bundle')
systemProperty 'tests.opensearch.user', System.getProperty('tests.opensearch.user')
systemProperty 'tests.opensearch.password', System.getProperty('tests.opensearch.password')
systemProperty 'tests.opensearch.version', System.getProperty('tests.opensearch.version')
filter {
includeTestsMatching '*IT'
includeTestsMatching '*Test'
}
}
jacocoTestReport {
dependsOn test
reports {
xml.required
}
afterEvaluate {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
// TODO: find a way to include the classes covered by OpenSearch test framework
'com/amazon/dataprepper/plugins/sink/opensearch/OpenSearchSink.class',
'com/amazon/dataprepper/plugins/sink/opensearch/IndexStateManagement.class'
])
})
}
}
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule {
element = 'CLASS'
excludes = [
// TODO: find a way to include the classes covered by OpenSearch test framework
'org.opensearch.dataprepper.plugins.sink.opensearch.OpenSearchSink',
'org.opensearch.dataprepper.plugins.sink.opensearch.IndexStateManagement'
]
limit {
minimum = 0.90
}
}
}
}