OpenSearch/x-pack/plugin/searchable-snapshots/build.gradle

49 lines
1.3 KiB
Groovy

import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.esplugin'
esplugin {
name 'searchable-snapshots'
description 'A plugin for the searchable snapshots functionality'
classname 'org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshots'
extendedPlugins = ['x-pack-core']
}
archivesBaseName = 'x-pack-searchable-snapshots'
dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default')
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
}
// xpack modules are installed in real clusters as the meta plugin, so
// installing them as individual plugins for integ tests doesn't make sense,
// so we disable integ tests
integTest.enabled = false
// add all sub-projects of the qa sub-project
gradle.projectsEvaluated {
project.subprojects
.find { it.path == project.path + ":qa" }
.subprojects
.findAll { it.path.startsWith(project.path + ":qa") }
.each { check.dependsOn it.check }
}
configurations {
testArtifacts.extendsFrom testRuntime
testArtifacts.extendsFrom testImplementation
}
def testJar = tasks.register("testJar", Jar) {
appendix 'test'
from sourceSets.test.output
}
artifacts {
testArtifacts testJar
}
test {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
}
}