How can I keep Gradle build from changes selected run configuration?

So here's the workflow I want to do in my IDEA Ultimate 14.0/14.1:

1) Run Gradle build task to build my Grails project from the Gradle tool window (I'm using Grails Gradle Plugin)
2) Run my Grails project by clicking on the run arrow toolbar button

However, when I run the Gradle build, it changes the selected Run configuration in the dropdown on the main toolbar to be the last Gradle task runner. About 50% of the time, I forget about this "feature" and click on the run arrow without first selecting the Grails web app run configuration. Thus, I get a second build instead of what I really wanted.  If nothing's changed, it's a fast second build in Gradle, but still annoying.

I looked for a IDE setting to maybe keep that from happening, but couldn't find one.  Is there a setting I can make to keep Gradle build from changing the selected run configuration?

If not, here are a couple of suggestions for future enhancements:

  1. Don't change the selected run configuration in the toolbar. If I have it selected to run the web app, leave it alone, even if I run a Gradle (or Maven or Ant or whatever) build
  2. Separate the build run configurations from the main toolbar dropdown and put a dropdown on the build tool window.  Then if I run the clean, compile, build, assemble, etc. task, keep those selections in a local dropdown on the build tool window for easy selection.

Thanks for making IDEA such a great tool! It usually does a great job of "reading my mind" when I want to do something - just not in this case.


Message was edited by: madjack

1 comment
Comment actions Permalink

Sorry to reply to my own post, but I wanted to note that I see the Gradle build run configs listed in the Gradle tool window. This will work fine instead of a new dropdown control in that tool window. Now if only I can keep my build run from changing my selected app run on the main toolbar, I'll be able to build and run without manually changing the run config on the toolbar each time.




Please sign in to leave a comment.