/* * 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"]