Add new option to allow full delegation of IntelliJ tests to Gradle #126772
+14
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Low priority
This PR adds a new option to our Gradle build that lets the user specify they would like all runs and test runs created by IntelliJ through clicking gutter icons etc to use Gradle as the execution engine rather than IntelliJs own runner.
Currently, we use the IntelliJ plugin for Gradle to override these settings in the IDE every time we import the ES repo. This means the user has no way to express their preference for how tests should be run in the IDE as any change made to IntelliJ's settings is overridden next import.
This is especially frustrating as running test with the IntelliJ test runner is generally not possible so it just adds extra clicks when running tests.
Users can enable this delegation of all runs by setting
org.elasticsearch.idea-delegate-to-gradle=true
in~/.gradle/gradle.settings
. Default's to existing behaviour (Prompt user for test runner choice)This PR also contains documentation for this setting and the currently undocumented setting that appends
--configuration-cache
to all generated run configs.I tagged @mark-vieira in this one as he created the initial config. Also open to just making this the default behaviour and prompting be the override.