When delegating "build" in IDEA to gradle.. can I ...
# announcements
s
When delegating "build" in IDEA to gradle.. can I configure that somehow? I had hoped I could create run configuration for
gradle build
and IDEA would use it on build. Anyone tried something similar? I guess what I would like is the ability to set a custom
-P
or
-D
property for IDEA tasks
v
If it were like that, then
assemble
, not
build
. But I don't think you can, or at least I don't remember this being possible. You would need to set those variables in your Gradle properties file, either in the project or in your home directory. But this is probably worth creating a feature request. If you post one, share the link here, I'd definitely vote for it.
v
For tests you are btw. not correct.
For tests run configurations are generated and those you can change to add configuration
s
Right. But for tests even then one might prefer certain defaults so one did not have to reapply these for every single test case that is launched from the IDE
v
You can do exactly that
Just edit the run configuration template
s
Yeah but it really ought to be something related to the project. I dont know about you but I often run single test methods which then generates new run configurations (afaik)
v
It is about the project. The templates are edited per project
And yes, new run configuration for new single test, that's why I suggested to edit the template from which they are derived 🙂
s
Ah right. I understand you know