-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add new option to allow full delegation of IntelliJ tests to Gradle #126772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new option to allow full delegation of IntelliJ tests to Gradle #126772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me but I think @breskeby should have eyes on this as well.
CONTRIBUTING.md
Outdated
| `org.elasticsearch.idea-configuration-cache` | Should IntelliJ enable the Gradle Configuration cache to speed up builds when generating run configs | *`ture`, `false` | | ||
| `org.elasticsearch.idea-delegate-to-gradle` | Should IntelliJ use Gradle for all generated run / test configs or prompt each time | `true`, *`false` | | ||
|
||
These options can be set anywhere on the Gradle config path including in `~/.gradle/gradle.settings` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just use ~/.gradle/gradle.properties
for this as there's build-in support to read props in gradle from that file. I'm surprised gradle.settings
even works. I guess a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope not a typo. Stuff in ~/.gradle/gradle.settings
applies globally for the current user but the repo specific file would work too. I guess it comes down to if we think it would be useful for it to apply to multiple projects or not (IE would I like to to just globally apply to stateful and serverless assuming they share this build code?).
I could be convinced either way or, perhaps we just document the options here and leave it up to the user if they want it applied globally or just per repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realised this is totally a typo -.- Updating now
Co-authored-by: Rene Groeschke <[email protected]>
Pinging @elastic/es-delivery (Team:Delivery) |
Fix typo in settings file name in docs
🔍 Preview links for changed docs: 🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes. |
…lastic#126772) * Add new option to allow full delegation of tests to gradle in IntelliJ plus docs * Update CONTRIBUTING.md Co-authored-by: Rene Groeschke <[email protected]> * Update CONTRIBUTING.md Fix typo in settings file name in docs --------- Co-authored-by: Rene Groeschke <[email protected]>
…126772) (#129620) * Add new option to allow full delegation of tests to gradle in IntelliJ plus docs * Update CONTRIBUTING.md * Update CONTRIBUTING.md Fix typo in settings file name in docs --------- Co-authored-by: Rene Groeschke <[email protected]>
…126772) (#129619) * Add new option to allow full delegation of tests to gradle in IntelliJ plus docs * Update CONTRIBUTING.md * Update CONTRIBUTING.md Fix typo in settings file name in docs --------- Co-authored-by: Rene Groeschke <[email protected]>
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.