forked from opensearch-project/performance-analyzer-rca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (87 loc) · 3.47 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
/*
* Copyright <2019> Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file 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 'nebula.ospackage' version "5.3.0"
}
ext {
opendistroVersion = '1.0'
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}
version = "${opendistroVersion}.0"
if (isSnapshot) {
version += "-SNAPSHOT"
}
test {
enabled = true
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava {
JavaVersion targetVersion = JavaVersion.toVersion(targetCompatibility);
if (targetVersion.isJava9Compatible()) {
options.compilerArgs += ["--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED"]
}
}
javadoc {
options.addStringOption("-add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED")
}
project.afterEvaluate {
JavaVersion targetVersion = JavaVersion.toVersion(targetCompatibility)
// cannot contain the first version
// should be '8' or '11' etc.
String version = targetVersion.toString()
if (version.length() > 2) {
version = targetVersion.toString().substring(2)
}
compileJava.options.compilerArgs.removeAll(['--release', version])
}
repositories {
mavenCentral()
}
configurations {
includeJars
}
tasks.withType(JavaCompile) {
options.warnings = false
}
dependencies {
if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
compile files("${System.properties['java.home']}/../lib/tools.jar")
}
compile 'org.jooq:jooq:3.10.8'
compile 'org.bouncycastle:bcprov-jdk15on:1.60'
compile 'org.bouncycastle:bcpkix-jdk15on:1.60'
compile 'org.xerial:sqlite-jdbc:3.8.11.2'
compile 'com.google.guava:guava:27.0.1-jre'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.11'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.11'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.8'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.8'
// JDK9+ has to run powermock 2+. https://github.com/powermock/powermock/issues/888
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.0'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.0'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
testCompile group: 'org.powermock', name: 'powermock-core', version: '2.0.0'
testCompile group: 'org.powermock', name: 'powermock-api-support', version: '2.0.0'
testCompile group: 'org.powermock', name: 'powermock-module-junit4-common', version: '2.0.0'
testCompile group: 'org.javassist', name: 'javassist', version: '3.24.0-GA'
testCompile group: 'org.powermock', name: 'powermock-reflect', version: '2.0.0'
testCompile group: 'net.bytebuddy', name: 'byte-buddy', version: '1.9.3'
testCompile group: 'org.objenesis', name: 'objenesis', version: '3.0.1'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest:2.1'
testCompile 'org.hamcrest:hamcrest-library:2.1'
}