forked from opendistro-for-elasticsearch/perftop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (96 loc) · 2.42 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
buildscript {
ext {
es_version = System.getProperty("es.version", "7.2.0")
}
// This isn't applying from repositories.gradle so repeating it here
repositories {
mavenCentral()
}
dependencies {
classpath "org.elasticsearch.gradle:build-tools:${es_version}"
}
}
plugins {
id "java"
id "com.moowork.node" version "1.2.0"
}
node {
version = "10.15.0"
download = true
}
ext {
opendistroVersion = '1.2.0'
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
isLinux = "true" == System.getProperty("build.linux", "false")
isMacOS = "true" == System.getProperty("build.macos", "false")
}
group = "com.amazon.opendistroforelasticsearch"
version = "${opendistroVersion}.0"
if (isLinux) {
version += "-LINUX"
}
if (isMacOS) {
version += "-MACOS"
}
if (isSnapshot) {
version += "-SNAPSHOT"
}
repositories {
mavenCentral()
}
apply plugin: 'elasticsearch.esplugin'
ext {
projectSubstitutions = [:]
licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE.txt')
}
test {
enabled = false
}
licenseHeaders.enabled = false
task npmRunBuild(type: NpmTask, dependsOn: 'npmInstall') {
if (isLinux) {
args = ['run', 'build-linux']
}
if (isMacOS) {
args = ['run', 'build-macos']
}
}
task npmRunClean(type: NpmTask) {
args = ['run', 'clean']
}
compileJava {
dependsOn npmRunBuild
}
clean {
dependsOn npmRunClean
}
// We are excluding plugin descriptor for PerfTop
// The info here could be random
esplugin {
name 'perf-top'
description 'PerfTop'
classname 'com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerPlugin'
}
bundlePlugin {
exclude "perf-top*.jar"
exclude "plugin-descriptor.properties"
if (isLinux) {
from ("build/") {
include "perf-top-linux"
}
}
if (isMacOS) {
from ("build/") {
include "perf-top-macos"
}
}
from ("dashboards/") {
into "dashboards/"
include "*.json"
}
}
// The testingConventions task now mandates atleast one of the integ test tasks to be performed.
// Since perftop is not really a plugin on its own, it fails the plugin install step during the integ tests. So,
// skip running testingConventions task.
gradle.startParameter.excludedTaskNames += ["integTestCluster#wait", "integTestRunner", "testingConventions"]