Gradle application not restarting when running
Hi! I'm running a project that is imported from Gradle, and using "Build and run using Gradle". When I press ^R to run, it always starts a new instance of the application. I would prefer it to restart the running task. Is there a way to make it do that? I do not have "Allow parallel run" checked in the Configuration.
When I have "Build and run using IntelliJ", this works as expected, but for various reasons I'd like to stick with the default option of using Gradle. ]
Version info:
IntelliJ IDEA 2020.1 (Ultimate Edition)
Build #IU-201.6668.121, built on April 8, 2020
Licensed to Webbhälsa AB / Simon Reimer
Subscription is active until May 5, 2020
Runtime version: 11.0.6+8-b765.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Non-Bundled Plugins: CheckStyle-IDEA, org.intellij.plugins.hcl, Pythonid, org.jetbrains.kotlin
Please sign in to leave a comment.
Run (Ctrl+R shortcut) action does indeed not ask for stopping currently running configuration if it was started by Gradle, please vote for this issue in our tracker: https://youtrack.jetbrains.com/issue/IDEA-212049
There is however a separate Re-run action (Cmd+R default shortcut) that you may use to rerun launched configuration.
Allright, thank you! Yes, that is a rather unexpected inconsistency to me, so I will vote for the issue. Is there also any kind of "Re-run in debug mode" action?
Regards, Simon
Re-run action will re-run currently launched configuration (be it run or debug). For Gradle though there is a usability issue: the Gradle debug tab should be active at this point for the IDE to re-launch corresponding Gradle task. There is a related issue for this: https://youtrack.jetbrains.com/issue/IDEA-205660
Aha, ok! So a ⌘5 ⌘R sequence does the job. Good enough for now, thanks! :-)