Skip to content

Commit 5904a41

Browse files
authored
fixing gradle issue (#735)
* fixing gradle issue Signed-off-by: Dhrubo Saha <[email protected]> * fixing CVE-2022-1471 Signed-off-by: Dhrubo Saha <[email protected]> * fixing CVE issue Signed-off-by: Dhrubo Saha <[email protected]> * avoiding deprecation Signed-off-by: Dhrubo Saha <[email protected]> --------- Signed-off-by: Dhrubo Saha <[email protected]>
1 parent 7a51dcc commit 5904a41

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

client/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ dependencies {
2222

2323
jacocoTestReport {
2424
reports {
25-
xml.enabled false
26-
csv.enabled false
25+
xml.getRequired().set(true)
26+
csv.getRequired().set(false)
27+
html.getRequired().set(true)
2728
}
2829

2930
dependsOn test

ml-algorithms/build.gradle

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
2+
13
/*
24
* Copyright OpenSearch Contributors
35
* SPDX-License-Identifier: Apache-2.0
@@ -40,7 +42,17 @@ dependencies {
4042
implementation("ai.djl.onnxruntime:onnxruntime-engine:0.19.0") {
4143
exclude group: "com.microsoft.onnxruntime", module: "onnxruntime"
4244
}
43-
implementation "com.microsoft.onnxruntime:onnxruntime_gpu:1.13.1"
45+
def os = DefaultNativePlatform.currentOperatingSystem
46+
//mac doesn't support GPU
47+
if (os.macOsX) {
48+
dependencies {
49+
implementation "com.microsoft.onnxruntime:onnxruntime:1.13.1"
50+
}
51+
} else {
52+
dependencies {
53+
implementation "com.microsoft.onnxruntime:onnxruntime_gpu:1.13.1"
54+
}
55+
}
4456
}
4557

4658
configurations.all {
@@ -49,8 +61,9 @@ configurations.all {
4961

5062
jacocoTestReport {
5163
reports {
52-
xml.enabled false
53-
csv.enabled false
64+
xml.getRequired().set(true)
65+
csv.getRequired().set(false)
66+
html.getRequired().set(true)
5467
}
5568

5669
dependsOn test

plugin/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ task release(type: Copy, group: 'build') {
229229

230230
jacocoTestReport {
231231
reports {
232-
xml.enabled true
233-
html.enabled true
234-
csv.enabled false
232+
xml.getRequired().set(true)
233+
csv.getRequired().set(false)
234+
html.getRequired().set(true)
235235
}
236236

237237
dependsOn test
@@ -377,7 +377,7 @@ tasks.withType(licenseHeaders.class) {
377377
}
378378

379379
checkstyle {
380-
toolVersion = '8.29'
380+
toolVersion = '8.38'
381381
}
382382

383383
String bwcVersion = "2.4.0.0"

0 commit comments

Comments
 (0)