Prepare for Grade 10
Author: andselCreated Aug 19, 2026Updated Aug 19, 2026
Updating to Gradle 10 could involve a couple of fixes:
- make scripts ready for configuration cache
- resolve compatibility issues highlighted running with
--warning-mode
Configuration cache
Configuration Cache improves build performance by caching the result of the configuration phase and reusing it for subsequent builds.
In Gradle 10 Configuration Cache is enabled by default.
To test previous versions edit gradle.properties and add:
org.gradle.configuration-cache=trueRunning this on #19216
./gradlew :logstash-core:testresult in:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Invocation of 'Task.project' by task ':downloadJRuby' at execution time is unsupported with the configuration cache.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.
5 problems were found storing the configuration cache, 4 of which seem unique.
- Task `:buildCustomJRuby` of type `org.gradle.api.tasks.Exec`: cannot serialize object of type 'java.io.ByteArrayOutputStream', a subtype of 'java.io.OutputStream', as these are not supported with the configuration cache. Only 'System.out' or 'System.err' can be used there.
See https://docs.gradle.org/9.7.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
- Task `:downloadJRuby` of type `de.undercouch.gradle.tasks.download.Download`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See https://docs.gradle.org/9.7.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
- Task `:verifyFile` of type `de.undercouch.gradle.tasks.download.Verify`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See https://docs.gradle.org/9.7.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
- Task `:downloadJRuby` of type `de.undercouch.gradle.tasks.download.Download`: invocation of 'Task.project' at execution time is unsupported with the configuration cache.
See https://docs.gradle.org/9.7.0/userguide/configuration_cache_requirements.html#config_cache:requirements:use_project_during_executionResolve warnings
Previous version of Gradle can provide insights on what's going to generate error in the next one. Run the following command to discover and fix the issues:
./gradlew clean --warning-mode allSource: elastic/logstash