-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
128 lines (109 loc) · 2.88 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
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "1.3.0-SNAPSHOT")
}
// This isn't applying from repositories.gradle so repeating it here
repositories {
mavenCentral()
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath "org.opensearch.gradle:build-tools:${opensearch_version}"
}
}
plugins {
id "java"
id "com.moowork.node" version "1.2.0"
}
node {
version = "10.15.0"
download = false
}
ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
isLinux = "true" == System.getProperty("build.linux", "false")
isMacOS = "true" == System.getProperty("build.macos", "false")
}
group = "org.opensearch"
version = opensearch_version - '-SNAPSHOT' + '.0'
if (isSnapshot) {
version += "-SNAPSHOT"
}
if (isLinux) {
version += "-linux-x64"
}
if (isMacOS) {
version += "-macos-x64"
}
if (isSnapshot) {
version += "-SNAPSHOT"
}
repositories {
mavenCentral()
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
}
apply plugin: 'opensearch.opensearchplugin'
ext {
projectSubstitutions = [:]
licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE.txt')
}
test {
enabled = false
}
licenseHeaders.enabled = true
validateNebulaPom.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
opensearchplugin {
name 'opensearch-perf-top'
description 'OpenSearch PerfTop'
classname 'org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin'
}
bundlePlugin {
exclude "opensearch-perf-top*.jar"
exclude "plugin-descriptor.properties"
if (isLinux) {
from ("build/") {
include "opensearch-perf-top-linux"
}
}
if (isMacOS) {
from ("build/") {
include "opensearch-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 += ["testingConventions"]