-
Notifications
You must be signed in to change notification settings - Fork 138
/
build.gradle
131 lines (118 loc) · 5.29 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
id 'java'
id 'java-library'
id 'jacoco'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.25.0'
}
repositories {
mavenCentral()
}
dependencies {
implementation project(path: ":${rootProject.name}-spi", configuration: 'shadow')
implementation project(path: ":${rootProject.name}-common", configuration: 'shadow')
implementation project(':opensearch-ml-memory')
compileOnly group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}"
implementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
testImplementation "org.opensearch.test:framework:${opensearch_version}"
implementation "org.opensearch:common-utils:${common_utils_version}"
implementation ("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}")
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
implementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
implementation group: 'org.tribuo', name: 'tribuo-clustering-kmeans', version: '4.2.1'
implementation group: 'org.tribuo', name: 'tribuo-regression-sgd', version: '4.2.1'
implementation group: 'org.tribuo', name: 'tribuo-anomaly-libsvm', version: '4.2.1'
implementation group: 'org.tribuo', name: 'tribuo-classification-sgd', version: '4.2.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.15.1'
implementation 'software.amazon.randomcutforest:randomcutforest-parkservices:3.0-rc3'
implementation 'software.amazon.randomcutforest:randomcutforest-core:3.0-rc3'
implementation group: 'io.protostuff', name: 'protostuff-core', version: '1.8.0'
implementation group: 'io.protostuff', name: 'protostuff-runtime', version: '1.8.0'
implementation group: 'io.protostuff', name: 'protostuff-api', version: '1.8.0'
implementation group: 'io.protostuff', name: 'protostuff-collectionschema', version: '1.8.0'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'
implementation group: 'com.google.guava', name: 'guava', version: '32.1.2-jre'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation platform("ai.djl:bom:0.28.0")
implementation group: 'ai.djl.pytorch', name: 'pytorch-model-zoo'
implementation group: 'ai.djl', name: 'api'
implementation group: 'ai.djl.huggingface', name: 'tokenizers'
implementation("ai.djl.onnxruntime:onnxruntime-engine") {
exclude group: "com.microsoft.onnxruntime", module: "onnxruntime"
}
def os = DefaultNativePlatform.currentOperatingSystem
//arm/macos doesn't support GPU
if (os.macOsX || System.getProperty("os.arch") == "aarch64") {
dependencies {
implementation "com.microsoft.onnxruntime:onnxruntime:1.16.3!!"
}
} else {
dependencies {
implementation "com.microsoft.onnxruntime:onnxruntime_gpu:1.16.3!!"
}
}
implementation platform('software.amazon.awssdk:bom:2.25.40')
api 'software.amazon.awssdk:auth:2.25.40'
implementation 'software.amazon.awssdk:apache-client'
implementation ('com.amazonaws:aws-encryption-sdk-java:2.4.1') {
exclude group: 'org.bouncycastle', module: 'bcprov-ext-jdk18on'
}
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
implementation group: 'software.amazon.awssdk', name: 'aws-core', version: '2.25.40'
implementation group: 'software.amazon.awssdk', name: 's3', version: '2.25.40'
implementation group: 'software.amazon.awssdk', name: 'regions', version: '2.25.40'
implementation 'com.jayway.jsonpath:json-path:2.9.0'
implementation group: 'org.json', name: 'json', version: '20231013'
implementation group: 'software.amazon.awssdk', name: 'netty-nio-client', version: '2.25.40'
}
lombok {
version = "1.18.30"
}
configurations.all {
resolutionStrategy.force 'com.google.protobuf:protobuf-java:3.25.5'
resolutionStrategy.force 'org.apache.commons:commons-compress:1.26.0'
}
jacocoTestReport {
reports {
xml.getRequired().set(true)
csv.getRequired().set(false)
html.getRequired().set(true)
}
dependsOn test
}
List<String> jacocoExclusions = [
// TODO: add more unit test to meet the minimal test coverage.
'org.opensearch.ml.engine.algorithms.agent.MLConversationalFlowAgentRunner'
]
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
excludes = jacocoExclusions
minimum = 0.65 //TODO: increase coverage to 0.90
}
limit {
counter = 'BRANCH'
excludes = jacocoExclusions
minimum = 0.55 //TODO: increase coverage to 0.85
}
}
}
dependsOn jacocoTestReport
}
check.dependsOn jacocoTestCoverageVerification
compileJava.dependsOn(':opensearch-ml-common:shadowJar')
spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'
eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}