Commit graph

35 commits

Author SHA1 Message Date
Rene Groeschke
ef272bfb0c
[IDEA] Enable Gradle Configuration Cache for Gradle Test Runner (#123552) (#123623)
* [IDEA] Enable Gradle Configuration Cache for Gradle Runner

This should speedup repetitives usages of the Gradle Runner for the majority of test executions
We added a flag to disable it explicitly if it does not work for certain scenarios
2025-03-04 19:49:26 +11:00
Rene Groeschke
581b9ab7c0
[8.16] [Gradle] Remove static use of BuildParams (#115122) (#117434)
* [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

(cherry picked from commit 13c8aaeffa)

# Conflicts:
#	TESTING.asciidoc
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build.gradle
#	modules/ingest-geoip/qa/full-cluster-restart/build.gradle
#	qa/mixed-cluster/build.gradle
#	x-pack/plugin/ent-search/qa/full-cluster-restart/build.gradle
#	x-pack/plugin/eql/qa/rest/build.gradle
#	x-pack/plugin/fleet/qa/rest/build.gradle
#	x-pack/plugin/kql/build.gradle
#	x-pack/plugin/mapper-unsigned-long/build.gradle
#	x-pack/plugin/ml/qa/multi-cluster-tests-with-security/build.gradle
#	x-pack/plugin/security/qa/multi-cluster/build.gradle
#	x-pack/plugin/sql/qa/jdbc/build.gradle
#	x-pack/plugin/transform/qa/multi-cluster-tests-with-security/build.gradle

* Fix merge

* [Build] Fix fips testing after buildparams rework (#116934)

* More Cleanup

* [Build] Fix checkstyle exclusions on windows (#115185)

* More merge fixes

* Delete x-pack/plugin/kql/build.gradle
2024-11-27 12:34:32 +01:00
Rene Groeschke
7e24080fb2
Suppress gradle welcome messages (#102898)
There are not usefuil for us
2023-12-03 02:08:12 +01:00
Mark Vieira
4eb72d358e
Fix build failures when setting RUNTIME_JAVA_HOME (#100554)
Follow up to #99922. Removing `org.gradle.java.installations.fromEnv`
from our `gradle.properties` file had the side effect of breaking the
`RUNTIME_JAVA_HOME` environment variable since Gradle is unaware of this
toolchain. We need to add `RUNTIME_JAVA_HOME` back here so that setting
this environment variable still works and avoid failures like this one:
https://gradle-enterprise.elastic.co/s/gaezgaglsn76o/failure?expanded-stacktrace=WyIwLTEtMiJd#1
2023-10-09 17:47:13 -04:00
Rene Groeschke
1fa816ee8c
Use toolchain in favor of custom jdk plugin for runtime jdk setup (#99922)
* Use toolchain in favor of custom jdk plugin for runtime jdk setup
* Remove logic for Passing runtime java version via JAVAX_HOME
* Cleanup runtime provisioning gradle script
2023-10-09 13:46:00 +02:00
Ryan Ernst
16b45575c3
Fix Painless method lookup over unknown super interfaces (#97062)
In Java 21 List now extends SequencedCollection, instead of Collection
directly. When resolving methods Painless starts at the defined type,
and iterates up through super classes and interfaces. Unfortunately if a
superinterface was not known, as it is for SequencedCollection since it
is not in the allowed list of classes, method resolution would give up.
This commit adjusts the superinterface interation to continue traversing
until the method is found or no more superinterfaces are found.

fixes #97022
2023-06-23 21:28:13 -04:00
Rene Groeschke
ab89ffbdf7
Differentiate qa project group ids from in production projects (#96536)
* Differentiate qa project group ids from in production projects

We need to avoid duplicate GADs of gradle subprojects as we have duplicates otherwise.

Ideally we have a notion of a qa project or internal use project mold into our gradle logic. but for now thats probably enough. in the non xpack modules and plugin folder we workaround this issue by only applying the groupId for direct child projects
2023-06-05 10:28:13 +02:00
Mark Vieira
354d3aea18 Add JAVA20_HOME environment variable to jdk installation list 2023-02-09 07:43:52 -08:00
Rene Groeschke
3909b5eaf9
Add verification metadata for dependencies (#88814)
Removing the custom dependency checksum functionality in favor of Gradle build-in dependency verification support. 

- Use sha256 in favor of sha1 as sha1 is not considered safe these days.

Closes https://github.com/elastic/elasticsearch/issues/69736
2022-08-04 09:51:16 +02:00
Rene Groeschke
90fe732024
Allow easing testing of java ea versions using gradle java tool chain support (#88188)
This introduces the ability to simply configure a java tool chain for elasticsearch java projects to be used.
If an environment variable `JAVA_TOOLCHAIN_HOME `is declared, this JDK will be used as toolChain in elasticsearch.java projects. If JAVA_RUNTIME_HOME is configured, it takes precedence over JAVA_TOOLCHAIN_HOME
for configuring test cluster runtimes.

This should make testing our build with java `ea` versions easier and allows detangling the used compiler jdk from the gradle java runtime.
2022-07-04 08:43:18 +02:00
Mark Vieira
d9b27cfe6e Add environment variables for Java 18 and 19 Java home 2022-04-13 14:12:33 -07:00
Rene Groeschke
0b03f694a3
Fix Spotless failing with InvocationTargetException on JDK 16 (#73246) 2021-05-20 08:46:20 +02:00
Przemyslaw Gomulka
b0a0d56bbe
Update joda dependency to latest 2.10.10 (#72052)
Latest JDKs are shipping with timezone data 2021a which is also included
in latest joda. In order to have the timezone information consistent in
both joda and java.time joda dependnecy has to be updated

closes #72028
2021-04-29 09:59:28 +02:00
Mark Vieira
b26fa7067f
Improve error messages around detecting Java installations (#70166) 2021-03-09 10:28:23 -08:00
Rene Groeschke
a8757f9efe
Update build to use gradle wrapper 6.8 (#65596)
- Updates our build to use the latest Gradle 6.8 release which is the last release 
before the major 7.0 release. 
- Resolve available gradle versions using built-in toolchain support
- Fixes deprecated usage of JavaInstallationRegistry
- We replace jdk handling in our build to rely on jvm detection provided by the gradle build tool itself. 
As we rely on environment variables pointing to jdks we wire this into the gradle jdk detection mechanism
2021-01-12 11:38:29 +01:00
Rene Groeschke
0e0392ca7b
Explicitly use TLS 1.2 in Gradle (#63880) 2020-10-19 08:52:48 -07:00
Mark Vieira
5197043c41
Use default memory settings for Gradle daemon (#63445) 2020-10-08 10:31:32 -07:00
Rene Groeschke
5c4a3ec987
Enforce fail on deprecated gradle usage (#59598) 2020-07-16 10:28:27 +02:00
Mark Vieira
630fc0d255
Enable parallel builds by default (#52972) 2020-02-28 15:08:13 -08:00
Mark Vieira
e057f65a7d
Disable duplicate project detection in Gradle 6.2 (#52529) 2020-02-19 13:41:50 -08:00
Mark Vieira
cd2fc978f2
Suppress Gradle deprecation warnings in the console output (#52332) 2020-02-19 09:05:39 -08:00
Alpar Torok
a3d33677fa
Testclusters: improove timeout handling (#43440) 2019-07-01 11:29:54 +03:00
Alpar Torok
41d59954c1
Upgrade to Gradle 5.4.1 (#41750)
* Upgrade to Gradle 5.4.1

https://docs.gradle.org/5.4/release-notes.html

Notable: Support for JDK12 , API for incremental tasks

* Use newer version of checkstyle

* Increase stack size
2019-05-09 10:12:30 +03:00
Mark Vieira
c0e2c6b31f Create heap dump on OOME (#41031) 2019-04-11 13:38:12 +03:00
Alpar Torok
adc3816e32
Enable the Gradle daemon (#34545) 2018-10-20 11:14:41 +03:00
Jay Modi
309fb22181
Build: forked compiler max memory matches jvmArgs (#33138)
This commit removes the setting of the fork options maximum memory size
in our build plugin and instead adds the value in the gradle.properties
file to be alongside the value set in jvmArgs.

This change is necessary when using parallel compilation as 512m is not
sufficient for parallel compilation on some machines.
2018-08-27 10:26:25 -06:00
Jason Tedor
07b962f31a
Bump Gradle heap to 2 GB (#30535)
We are still seeing rare failures with the Gradle heap set to 1792m,
especially on machines with high core count. Given it appears we are
close to the needed threshold, this commit bumps the heap one more time
to 2 GB.
2018-05-11 14:30:36 -04:00
Jason Tedor
b33806ed15
Bump Gradle heap to 1792m (#30484)
After we stopped forking the compiler, some folks are running into out
of memory errors. This commit is a bump to the Gradle heap to workaround
these out of memory errors (until we can better understand their
source).
2018-05-09 14:29:29 -04:00
Jason Tedor
8b2eee39f0 Increase Gradle heap space to 1536m
This commit increases the heap space for the Gradle processes to
1536m. Note that the default is 1024m.
2017-12-19 21:45:43 -05:00
Jason Tedor
2f95e4a86c Gradle daemon is a demon
This commit adds a property that will prevent the Gradle daemon from
being used for builds (even if one is running). This is to avoid some
nasty issues (e.g., SIGBUS faults and other mmap diasters) that result
from class loaders not being closed properly.
2015-11-25 09:33:12 -05:00
Ryan Ernst
7a6155e12f Build: Consolidate dependencies specified in multiple places
Some dependencies must be specified in a couple places in the build.
e.g. randomized runner is specified both in buildSrc (for the gradle
wrapper plugin), as well as in the test-framework.

This change creates buildSrc/versions.properties which acts similar to
the set of shared version properties we used to have in the maven parent
pom.
2015-11-09 23:59:56 -08:00
Adrien Grand
d6d7af0a6c Upgrade to lucene-5.4.0-snapshot-1712973. 2015-11-09 15:53:27 +01:00
Areek Zillur
13b60e1b92 update to lucene-5.4.x-snapshot-1711508 2015-10-30 15:42:02 -04:00
Ryan Ernst
561436eba3 Build: Add back manifest info to jars
closes #14365
2015-10-29 13:59:52 -07:00
Ryan Ernst
c86100f636 Switch build system to Gradle
See #13930
2015-10-29 11:40:19 -07:00