1+ /*
2+ Gradle build file for development building, testing, and packaging.
3+ */
4+
15buildscript {
26 repositories {
3- mavenLocal()
47 mavenCentral()
58 }
69
@@ -19,38 +22,14 @@ repositories {
1922 mavenCentral()
2023}
2124
22- // add -Xlint:deprecation to check the Elasticsearch deprecation warning at compile-time
23- allprojects {
24- gradle. projectsEvaluated {
25- tasks. withType(JavaCompile ) {
26- options. compilerArgs << " -Xlint:deprecation"
27- options. compilerArgs << " -Xlint:unchecked"
28- }
29- }
30- }
31-
3225group = ' org.elasticsearch.plugin'
3326version = " ${ plugin_version} "
3427
35- def versions = org.elasticsearch.gradle.VersionProperties . versions
36-
3728apply plugin : ' java'
3829apply plugin : ' idea'
3930apply plugin : ' elasticsearch.esplugin'
4031apply plugin : ' elasticsearch.yaml-rest-test'
4132
42- // automatic formatting configuration (the same configuration as elasticsearch)
43- spotless {
44- java {
45- importOrderFile(' config/elastic.importorder' ) // import order file as exported from elastic
46- eclipse(). configFile(' config/formatterConfig.xml' )
47- trimTrailingWhitespace()
48- target ' src/**/*.java'
49- }
50- }
51-
52- check. dependsOn spotlessCheck
53-
5433esplugin {
5534 name ' pathhierarchy-aggregation'
5635 description ' Return a path hierarchy aggregation'
@@ -59,25 +38,46 @@ esplugin {
5938 noticeFile = rootProject. file(' README.md' )
6039}
6140
62-
41+ def versions = org.elasticsearch.gradle.VersionProperties . versions
6342dependencies {
6443 implementation " org.elasticsearch:elasticsearch:${ es_version} "
6544 yamlRestTestImplementation " org.elasticsearch.test:framework:${ es_version} "
6645 yamlRestTestImplementation " org.elasticsearch.test:yaml-rest-runner:${ es_version} "
6746 yamlRestTestImplementation " org.apache.logging.log4j:log4j-core:${ versions.log4j} "
6847}
6948
70- tasks. named(" yamlRestTest" ). configure {
71- systemProperty ' tests.security.manager' , ' false'
49+ // add -Xlint:deprecation to check the Elasticsearch deprecation warning at compile-time
50+ allprojects {
51+ gradle. projectsEvaluated {
52+ tasks. withType(JavaCompile ) {
53+ options. compilerArgs << " -Xlint:deprecation"
54+ options. compilerArgs << " -Xlint:unchecked"
55+ }
56+ }
7257}
7358
74- tasks. named(" test" ). configure {
75- systemProperty ' tests.security.manager' , ' false'
59+ // automatic formatting configuration (the same configuration as elasticsearch)
60+ spotless {
61+ java {
62+ importOrderFile(' config/elastic.importorder' ) // import order file as exported from elastic
63+ eclipse(). configFile(' config/formatterConfig.xml' )
64+ trimTrailingWhitespace()
65+ target ' src/**/*.java'
66+ }
7667}
7768
78- // Make sure the ES distribution used for rest tests is the "complete" variant
69+ check. dependsOn spotlessCheck
70+
7971testClusters. configureEach {
72+ // Make sure the ES distribution used for rest tests is the "complete" variant
8073 testDistribution = ' DEFAULT'
81- // disable security to disable failing warnings
74+
75+ // Disable security (avoids annoying warnings/failures with xpack features)
8276 setting ' xpack.security.enabled' , ' false'
77+
78+ // Logging levels for debugging: logs are located in build/testclusters/runTask-0/logs/
79+ setting ' logger._root' , ' DEBUG'
80+ setting ' logger.org.elasticsearch.plugins' , ' DEBUG'
81+ setting ' logger.org.elasticsearch.cluster' , ' DEBUG'
82+ setting ' logger.org.elasticsearch.cluster.metadata' , ' TRACE'
8383}
0 commit comments