Support for gradle command line args


(James Kojo) #1

Is there any way to customize the command line arguments used when executing gradle on a per-project basis?
I would like to be able to specify some -P arguments directly in the eclipse plugin that are only used in the dev environment.
My current workflow is to modify the gradle.properties, perform the gradle opertion(s), then revert the gradle.properties file.

Thanks,

James Kojo


(Stefan Oehme) #2

Depends on what you want to do:

For task execution there is the Arguments tab in launch configurations.

For project synchronization I would suggest you put the relevant arguments in the gradle.properties in your Gradle user home. This way they will be available for all projects both on the command line and Eclipse.


(James Kojo) #3

Modifying the gradle.properties in the Gradle user home doesn’t actually fix the issue for me. I actually do development on several different applications, each with slightly different requirements with regards to development properties.

What I would like is the ability to set custom arguments in the project-specific plugin configuration, like we used to be able to do in STS.
I can file a enhancement request unless you think the request in invalid.

Thanks!

James


(Stefan Oehme) #4

I don’t yet understand why the project needs special args to import into Eclipse, can you please elaborate on your use case? If you need special args in Eclipse, that would mean you also have to pass special args on every single command line build? That doesn’t seem very user friendly, maybe we can improve that.