OpenSearch/sandbox/build.gradle
Rabi Panda ca564fd04f
Enable adding experimental features through sandbox modules (#691)
OpenSearch uses plugins to add new features. A plugin can be included in the distribution by default (as part of *modules* directory) or can be installed optionally from a plugin repository.

This change provides a separate space called *sandbox* inside OpenSearch for the community to easily experiment new ideas and innovate. Ideally, this is where an experimental feature will reside before it can be promoted to the *modules* directory. All the plugins in this module will only be included in the **snapshot distributions**. During assembling distributions, we will check if the following two conditions are met to include the sandbox modules,

* the distribution is a snapshot i.e. the build system property `build.snapshot` is set to true. We use this because it will prevent accidental bundling of these modules in a release distribution.
* the `enable.sandbox` system property is set to true. By default it is set to true. The purpose of adding this extra flag is that we can exclude the modules from snapshots if needed. For example, we may want to run performance tests on snapshots without the sandbox modules.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-06-22 11:45:18 -05:00

35 lines
1.6 KiB
Groovy

/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
/**
* This module provides a space in OpenSearch for the community to easily experiment with new ideas and innovate.
* Ideally, this is where an experimental features will reside before it can be promoted to the corresponding directory
* in the project root. The sandbox module contains three subdirectories, that mirror the root libs, modules and
* plugins directories, each with similar intention.
*
* All artifacts from the sandbox/libs and sandbox/modules will be included in the snapshot distributions automatically.
* During assembling distributions, however, we will check if the following two conditions are met, for including the
* sandbox modules,
* 1. The distribution is a snapshot i.e. the build system property build.snapshot is set to true. We use this because,
* it will prevent accidental inclusion of these artifacts in a release distribution.
*
* 2. The sandbox.enabled system property is set to true. This new extra flag is added because we can exclude the
* modules from the snapshot distributions, if needed. For instance, we may want to run performance tests on snapshots
* without the sandbox modules.
*
* To build the distributions without the sandbox modules,
* ./gradlew assemble -Dsandbox.enabled=false
*
* Similarly we can run OpenSearch from source without the sandbox modules
* ./gradlew run -Dsandbox.enabled=false
*/
subprojects {
group = 'org.opensearch.sandbox'
}