elasticsearch/x-pack/plugin/deprecation/qa/rest/build.gradle
Rene Groeschke 13c8aaeffa
[Gradle] Remove static use of BuildParams (#115122)
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
2024-11-15 17:58:57 +01:00

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)
}