You can probably add the commandline options via either one of these two mechanisms:
1) Workspace Gradle preferences. Open "Window >> Preferences >> Gradle >> Arguments"
2) Via the "Gradle Launch Configuration Editor". You get this one, for example, when "Run As >> Gradle Build" from the project context menu. The editor has an 'Arguments' tab.
Launch configurations are saved in the workspace. So it should remember the arguments if you run the same tasks next time. And you can also get to them via the "run" menu. "Run >> External Tools >> External Tools Configuration >> Gradle".
It sounds to me though like you are arguing that running the tests should not be the default behavior for a build. That seems to be what the Gradle Devs have chosen to do. If you disagree you should probably argue with them about changing that. I doesn't seem like a great idea for Gradle tools to make the IDE tools explicitly deviate from the default behavior.
But... I hope the options to add '-x test' via global preferences in STS might work for your use case.
Kris
Kris De Volder -- SpringSource