mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-19 04:45:07 -04:00
Static fields dont do well in Gradle with configuration cache enabled. - Use buildParams extension in build scripts - Keep BuildParams.ci for now for easy serverless migration - Tweak testing doc
38 lines
1.2 KiB
Groovy
38 lines
1.2 KiB
Groovy
import org.elasticsearch.gradle.util.GradleUtils
|
|
import org.elasticsearch.gradle.internal.info.BuildParams
|
|
|
|
apply plugin: 'elasticsearch.base-internal-es-plugin'
|
|
apply plugin: 'elasticsearch.legacy-java-rest-test'
|
|
|
|
esplugin {
|
|
description 'Deprecated query plugin'
|
|
classname 'org.elasticsearch.xpack.deprecation.TestDeprecationPlugin'
|
|
}
|
|
|
|
dependencies {
|
|
javaRestTestImplementation project(path: ':x-pack:plugin:deprecation:qa:common')
|
|
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
|
|
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
|
|
}
|
|
|
|
// let the javaRestTest see the classpath of main
|
|
GradleUtils.extendSourceSet(project, "main", "javaRestTest", tasks.named("javaRestTest"))
|
|
|
|
restResources {
|
|
restApi {
|
|
include '_common', 'indices', 'index'
|
|
}
|
|
}
|
|
|
|
testClusters.configureEach {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'cluster.deprecation_indexing.enabled', 'true'
|
|
setting 'cluster.deprecation_indexing.flush_interval', '100ms'
|
|
setting 'xpack.security.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
}
|
|
|
|
// Test clusters run with security disabled
|
|
tasks.named("javaRestTest") {
|
|
buildParams.withFipsEnabledOnly(it)
|
|
}
|