elasticsearch/x-pack/plugin/deprecation/qa/early-deprecation-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

42 lines
1.4 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.EarlyDeprecationTestPlugin'
}
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 'xpack.security.enabled', 'false'
setting 'xpack.license.self_generated.type', 'trial'
setting 'cluster.deprecation_indexing.enabled', 'true'
setting 'cluster.deprecation_indexing.flush_interval', '1ms'
setting 'logger.org.elasticsearch.xpack.deprecation','TRACE'
setting 'logger.org.elasticsearch.xpack.deprecation.logging','TRACE'
}
// Test clusters run with security disabled
tasks.named("javaRestTest") {
buildParams.withFipsEnabledOnly(it)
}