51 lines
1.4 KiB
Groovy
51 lines
1.4 KiB
Groovy
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
apply plugin: 'elasticsearch.internal-cluster-test'
|
|
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')
|
|
internalClusterTestImplementation 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'
|
|
}
|
|
}
|